On 01/10/2012 12:31 PM, eugene wrote:
messageProducer.send(message, DeliveryMode.NON_PERSISTENT, 1, 10000);

OR

message.setJMSExpiration(10000);

From section 3.4.11 of the JMS specification, 'How Message Header Values Are Set', it looks like the 'correct' way in JMS is the first of these, i.e. the send method.

The text in http://docs.oracle.com/javaee/1.4/api/javax/jms/Message.html#setJMSExpiration%28long%29 also states 'JMS providers set this field when a message is sent', which isn't as explicit as it might be.

I find this (and the similar situation with delivery mode etc) to be unintuitive, but that is how it is specified. I'm not sure what exactly the Qpid JMS client does with the expiration specified on a message before a send() - can anyone else give an authoritative statement on that?

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to