activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khandelwalanuj <khandelwal.anu...@gmail.com>
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
subscriber.

@raj: Test case is pretty simple. 
Steps:
1) Run a java consumer who has durable subscription to a topic.
2) Remove the consumer without unsubscribing. (Offline/Inactive durable
subscriber)
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);
    producer.setTimeToLive(10000);

     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.

Thanks,
Anuj








--
View this message in context: http://activemq.2283324.n4.nabble.com/Non-persistent-Messages-Not-getting-expired-even-after-expiration-time-exceeded-tp4680428p4680512.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message