activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khandelwalanuj <>
Subject Re: Non persistent Messages Not getting expired even after expiration time exceeded
Date Thu, 24 Apr 2014 10:00:28 GMT
@art: Yes. If durable subscriber went offline, broker has to keep persistent
or non persistent both message somewhere(tmp storage). So that when the
subscriber comes up again, broker should be able to send the messages to

@raj: Test case is pretty simple. 
1) Run a java consumer who has durable subscription to a topic.
2) Remove the consumer without unsubscribing. (Offline/Inactive durable
3) Run a producer by specifying timetolive to 10 seconds and send messages
to the same topic using two ways:

    MessageProducer producer = mySession.createProducer(destination);

     1)  producer.setDeliveryMode(DeliveryMode.PERSISTENT) : In this case
you can see messages are        getting expired after expiration time (10
seconds) exceeded.

     2)  producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT) : In this
case you can see messages are not getting expired after expiration time (10
seconds) exceeded. Here message will only get expired when durable
subscriber again comes up.(As you told in last comment that msgs will not be
deleted untill they are ready to send). 

My question is about 2nd case only. That it should expire messages which are
in tmp store considering expiration time. It should not wait for durable
subscriber to come up again.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message