Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

When using message queues in WSO2 Message Broker, messages are removed from the message store when the message consumers acknowledge the messages were received. There are several acknowledgement models defined in JMS specification 1.1. If the client did not acknowledge a sent message before the Ack Time-out setting has elapsed, Message Broker assumes the message was not received by the message consumer and tries to redeliver the message. You canĀ configure the Ack Time-out value by opening the qpid-config.xml file in <MB_HOME>/repository/conf/advanced and editing the following entry:

Code Block
languagehtml/xml
<waitTimes>
      <!-- Max wait time (in seconds) for an acknowledgement for a given message from the client  -->
      <maxAckWaitTime>10</maxAckWaitTime>

If you want to limit the number of times Message Broker attempts to deliver the message, you can set the maximumNumberOfMessageDeliveryAttempts entry in qpid-config.xml:

Code Block
languagehtml/xml
<!--Broker will drop the message after the configured number of delivery attempts for each message.-->
	    <maximumNumberOfMessageDeliveryAttempts>10</maximumNumberOfMessageDeliveryAttempts>

Note that this is the total number of delivery attempts, not re-delivery attempts. When this threshold is reached, the message is permanently removed from the message store, and no further attempts to deliver the message will be made. This is useful when the client application does not acknowledge the message because an operation on the message failed.

If the message is successfully delivered on a redelivery attempt, the JMSRedelivered field is set to true in the message header, allowing the client to determine whether the message was delivered on its original attempt or on a redelivery attempt.