activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Subrata1208 <saha.subr...@GMAIL.COM>
Subject Re: Messages dont get redelivered till broker restart - expected behaviour?
Date Wed, 28 May 2008 09:53:48 GMT

i am using activemq 5.1

i am also getting the same problem.
This is how i am creating factory and connection 
connFactory = new ActiveMQConnectionFactory(url);
		        
				ActiveMQPrefetchPolicy  po = new ActiveMQPrefetchPolicy();
		        po.setQueuePrefetch(1);  
		        connFactory.setPrefetchPolicy(po);	
		        RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
                redeliveryPolicy.setMaximumRedeliveries(-1);
      	        connFactory.setRedeliveryPolicy(redeliveryPolicy);

and my On message method is ::
if (msg instanceof TextMessage) {
				counter++;
				TextMessage mesg = (TextMessage) msg;
				if (mesg != null) {
					String message = null;
					if(mesg != null){
						message = mesg.getText();
						System.out.println("Text Message Received :: "
								+ message);
						if(handler != null){
							status = handler.handleData(message);
							if(status){
								session.commit();
							} else {
								session.rollback();
							}
						}
						message = null;
						mesg = null;
					}				
					
				}
				return;
			}

where there is a prblem with processing a message it is not going to DLQ but
the message never got consumed until i 
restart the broker. 
-- 
View this message in context: http://www.nabble.com/Messages-dont-get-redelivered-till-broker-restart---expected-behaviour--tp9615827s2354p17509046.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message