Bug 1016059

Summary: Information about setting message expiry time is incomplete
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Martin Svehla <msvehla>
Component: DocumentationAssignee: David Michael <dmichael>
Status: CLOSED CURRENTRELEASE QA Contact: Russell Dickenson <rdickens>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: dmichael, mnovak, msvehla, smumford
Target Milestone: post-GAKeywords: Documentation
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Build Name: 14874, Administration and Configuration Guide-6.2-1 Build Date: 02-10-2013 13:01:57 Topic ID: 649-436139 [Latest]
Last Closed: 2014-11-23 23:16:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Martin Svehla 2013-10-07 12:21:18 UTC
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

Comment 3 Martin Svehla 2014-09-19 13:33:02 UTC
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."

Comment 6 Martin Svehla 2014-09-26 06:46:26 UTC
Thanks David!