[jboss-user] [JBoss Messaging] - JMS-messages with an expiry date (time-to-live) never expire
Online Metalhead
do-not-reply at jboss.com
Thu Aug 18 07:57:28 EDT 2011
Online Metalhead [http://community.jboss.org/people/Metalhead] created the discussion
"JMS-messages with an expiry date (time-to-live) never expire"
To view the discussion, visit: http://community.jboss.org/message/621652#621652
--------------------------------------------------------------
I would like to delete any jms-messages which could not be delivered to the subscriber after a small period.
So in my code I set the default timeToLive of my TopicPublisher to 30 seconds and I set the message timeToLive to 30 seconds, but the messages never seem to get expired.
Some pieces of java-code:
[code]
TopicPublisher publisher = ...;
publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
publisher.setTimeToLive(30000);
publisher.publish(message, DeliveryMode.NON_PERSISTENT, publisher.getPriority(), 30000);
[/code]
I also tried to set the DLQ and the ExpiryQueue, but it makes no difference: the messages stay in the conventional JMS-queue...
Can someone point me in the right direction how I can solve this?
Thanks in advance...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/621652#621652]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110818/601c52b8/attachment-0001.html
More information about the jboss-user
mailing list