Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When using message you use queues in WSO2 Message Broker, messages are will be removed from the message store when once the message consumers acknowledge that the messages were are received. There  There are several acknowledgement models defined in JMS specification 1.1

To configure the time within which consumers can acknowledge that messages were received, you can set the AndesAckWaitTimeOut entry in the JMS client as follows:

Code Block
System.setProperty("AndesAckWaitTimeOut", "30000");

If the acknowledgement fails within this the above time, the client informs the MB sever server that this the message was is rejected from the client. The message is then scheduled to be redelivered later by the server. If you want to limit the number of times the message broker attempts to redeliver the message, you can set the maximumRedeliveryAttempts entry  element in the broker.xml file as follows:

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

...

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 by the original attempt or on a redelivery later attempt.