Hide Forgot
Title: Set Message Expiry Describe the issue: Section is incomplete. It mentions only one way to set message time-to-live for JMS messages (by calling MessageProducer#setTimeToLive method). There are 2 other ways to do that: send message via MessageProducer#send method variant that allows setting TTL on per-message basis, or setting expiry on the Message object itself before sending it (by calling Message#setJMSExpiration). See Java EE 6 documentation for details: http://docs.oracle.com/javaee/6/api/javax/jms/MessageProducer.html#send%28javax.jms.Message,%20int,%20int,%20long%29 http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#setJMSExpiration%28long%29 Relevant section of upstream HornetQ documentation: http://docs.jboss.org/hornetq/2.3.0.Final/docs/user-manual/html/message-expiry.html
David, The text is still missing the description of setting TTL on per-message basis. I suggest adding the following text at the end of the "Introduction" section in chapter 20.8.11 (after the text about _HQ_ACTUAL_EXPIRY property): "Besides setting the time-to-live parameter on the JMS producer, you can also set it on a per-message basis. You can achieve this by adding TTL parameter to producer's send method when sending the message. [code example] producer.send(message, DeliveryMode.PERSISTENT, 0, 5000) [/code example] where the last parameter is message specific TTL."
Thanks David!