You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Suchitha Koneru (sukoneru)" <su...@cisco.com> on 2007/02/13 21:14:47 UTC

frequency at which the message is re sent

Hello ActiveMQ Users, 
                        I am using durable  topic subscriptions . The
session used is in auto acknowledge mode.
 
// code segment for session 
HerbieSession = (ActiveMQSession) HConn.createSession(false,
Session.AUTO_ACKNOWLEDGE);
 
Fot the message publishing ,  the time to live , is set as 5 minutes .
The following is the code segment
try{

pub = Sess.createPublisher(topic);

if(pub != null){

pub.setTimeToLive(300000);

pub.setDeliveryMode(DeliveryMode.NON_PERSISTENT);

tc.start();

}else{

System.out.println("JMS Event sender , publisher is null");

}

}catch(Exception e){

e.printStackTrace();

}

 

This is what I understood from durable subscriptions. Please correct me
if Iam wrong

There will be a mesage queue maintained for every durable subscriber
(identified uniquely by Client ID and Subscription name).

This queue will be monitored by a thread , which would remove messages
from it , once they expire, and which would also 

send the messages to the durable subscribers as and when they become
available.

Consider a scenario, where in ,when the message is published , and the
durable subscriber is not active at the moment,  to receive the messages
.   The durable subscriber becomes active later , the thread which
monitors the durable subscriber queue , send the messages to the
subscriber . Since the ActiveMq Session is configured in auto
acknowledge mode , the thread waits for acknowledgement from the
subscriber, just in case the subscriber does not send the
acknowledgement ,  will this thread keep sending the message to the
durable subscriber periodically until the message expires after 5
minutes ?

if this is the case , what is the frequency at which it re sends the
message to the durable  subscriber ?

Please let me know, 

thank you,

Suchitha.