views:

31

answers:

1

I need a message to be Acknowledged in a different Session than the one it is created in. If the consumed message is not ACKed in a given time, it should be added back to the queue. Is this possible using JMS( planning to use ActiveMQ as the broker).

A: 

I don't think it is possible.

If the message is consumed, it should be acknowledged by the consumer session (it can be auto or client acknowledgement). Acknowledgment is the key for guaranteed messaging and transaction mechanism. JMS server ensures the message is sent/consumed successfully using acknowledgement.

Regarding timeout question, if the JMS server didn't receive the ack in given time period, the message will be redelivered usually with JMSRedelivered flag set. I don't think it will be added back to the Queue then able to be consumed by same session or another session as a new message.

Sujee