Messages do not arrive

There are several common reasons why messages might not arrive.

Are the messages sent?

If messages are not arriving, the cause might be that the messages are not sent. For more information about diagnosing why messages are not sent, see Messages are not sent.

Is the message reliability level too low?

If the message is published with a message reliability level of at most once, the message might not arrive. To ensure that messages arrive, you must use the at least once, or the exactly once reliability level. For more information about message delivery, and message reliability, see Message delivery.

Is the topic subscription string correct?

If an application subscribes to a topic that does not exactly match the topic that the message was published to, the message does not arrive.

Check that the publication and subscription topic strings match. Make any necessary changes, and try publishing the message again.

Is the topic string valid?

If an invalid topic string is specified, an application cannot subscribe to the topic. There are a number of ways in which the topic string can be invalid. For more information about valid topic strings, see Table 1.

Does the messaging policy allow subscription?

When you create a messaging policy, you can restrict whether an application can publish or subscribe to a topic string. The restriction can be based on one or more of the following values: IP address, client ID, messaging user ID, messaging group, or the client certificate used. If messages are not arriving, the cause might be that the messaging policy does not allow the application to subscribe.

Check the logs for messages that indicate the messaging policy does not allow the subscription. To resolve the problem, connect the application to an endpoint with messaging policies that allow the subscription. Alternatively, change the messaging policy to allow the application to subscribe. For more information about configuring messaging policies, see Configuring message hubs.

Does the messaging policy allow the message to be received?

When you create a messaging policy, you can restrict whether an application can send, receive, or browse a queue. The restriction can be based on one or more of the following values: IP address, client ID, messaging user ID, messaging group, or the client certificate used. If messages are not arriving, the cause might be that the messaging policy does not allow the application to receive the message.

Check the logs for messages that indicate the messaging policy does not allow the application to receive the message. To resolve the problem, connect the application to an endpoint with messaging policies that allow the application to receive the message. Alternatively, change the messaging policy to allow the application to receive the message. For more information about configuring messaging policies, see Configuring message hubs.

Has the maximum topic depth been exceeded?

Eclipse Amlen has a maximum topic depth of 32 levels. If you publish a message to a topic string that exceeds this depth, the message is not published. Depending on the protocol that is used, the publish can seem to succeed, but the message does not arrive.

To resolve the problem, you must reduce the depth of the topic string.

Did the message timeout during transmission?

If a message is not fully transmitted to an MQTT client within 60 seconds, the message times out. After the timeout, the timeout value is doubled and the message is retransmitted with a DUP flag. If an ACK is received by Eclipse Amlen, the retransmission is canceled. This timeout value cannot be configured by the user, and applies only to subscriptions of QoS=1 or QoS=2.

Therefore, in situations where large messages are being transmitted, or when client applications are experiencing severe latency, it is possible that messages do not arrive. In rare instances, the client might receive duplicate messages.

To resolve the problem, wait for the message transmission to complete, and if possible, reduce the latency of the client application.

Do the messages match the selector criteria?

With JMS, you can specify a message selector when you create a subscription. If the messages do not match the message selector, messages do not arrive. If a message selector is used, ensure that it is specified correctly.

Are many clients sharing the same subscription on a single connection?

If large numbers of consumers are created on a single connection, the system performance can be impacted. This performance impact can result in a delay in receiving messages.

Is Max Messages Behavior set to Discard Old Messages?

If Max Messages Behavior is set to Discard Old Messages, some messages might not arrive.

Max Messages Behavior is an option in a messaging policy that determines what happens when the buffer for a subscription is full. That is, when the buffer for a subscription reaches the Max Messages value. If Max Messages Behavior is set to Discard Old Messages, and the buffer for a subscription is full, a percentage of old, undelivered messages are discarded. The quality of service, persistence, or priority of the message does not prevent a message from being discarded.

To resolve the problem, and ensure that all messages are received by an application, set Max Messages Behavior to Reject New Messages.

Is the value of MaxMessageMaxTimeToLive set too low?

If the value of the MaxMessageMaxTimeToLive parameter on the messaging policy is set too low, some messages might not arrive.

MaxMessageMaxTimeToLive is a parameter in a messaging policy that specifies the maximum time that a published or sent message can exist for in Eclipse Amlen. The publishing application can also set a value for message expiry time. The time that is set for message expiry is the lower of the value set in MaxMessageTimeToLive and the value set by the application.

You might need to adjust the value of the MaxMessageMaxTimeToLive parameter or the value set in the application so that messages can exist for longer in Eclipse Amlen.

Are expired messages arriving?

Ensure that client and server times are synchronized in order to minimize the possibility of expired messages being received. You might also need to adjust the value of the MaxMessageMaxTimeToLive parameter or the value set in the application.

Is your topic filter correct and does it match your messaging policies?

If you are subscribing to a topic with an MQTT global-shared subscription, and messages do not arrive, the problem might be the topic filter. See Topic filters for MQTT global-shared durable subscriptions for more information about configuring topic messaging policies for use with MQTT global-shared subscriptions.