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:
If you want to limit the number of times Message Broker attempts to deliver the message, you can set the
maximumNumberOfMessageDeliveryAttempts entry in
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.