Bug 1016059 - Information about setting message expiry time is incomplete
Summary: Information about setting message expiry time is incomplete
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: post-GA
: EAP 6.3.0
Assignee: David Michael
QA Contact: Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 12:21 UTC by Martin Svehla
Modified: 2014-11-23 23:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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


Attachments (Terms of Use)

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!


Note You need to log in before you can comment on or make changes to this bug.