- 
        1. Re: Message Redelivery not working. .mp911de Jul 3, 2011 3:42 AM (in response to nadiafern)Hi there, you can configure redelivery retries in messaging-service.xml (DefaultMaxDeliveryAttempts) and MaxDeliveryAttempts per each queue/topic. Best regards, Mark 
- 
        2. Re: Message Redelivery not working. .nadiafern Jul 5, 2011 11:29 AM (in response to mp911de)I have configured the DefaultMaxDeliveryAttempts on the messaging-service.xml as well as the MaxDeliveryAttempts for the queue. I reading the queue synchronously using the receivenowait method. I see that there was a lot of discussion around this on the forum. Is there any specific configuration that I need to make in order for message RE-delivery to work when using the receivenowait that i may have missed. Any help or inputs that i can try would be greatly appereciated. 
- 
        3. Re: Message Redelivery not working. .mp911de Jul 5, 2011 12:52 PM (in response to nadiafern)do you call Message.acknowledge() before your Exception is thrown? i.e messacke.acknowledge(); try{ ...(something throws exception) }catch(Exception e) log.log(e.getMessage(), e); throw new JMSException(e); } PS: did you look in the DLQ (DeadLetter-Queue) if you'll find your messages there? 
- 
        4. Re: Message Redelivery not working. .nadiafern Jul 5, 2011 1:36 PM (in response to mp911de)Thank you for replying to my post. This is how i have the logic : In success scenario : 1) Read the queue : Message message = receiver.receiveNoWait(); 2) Is message is not null then process it. 3) If no exception then call :message.acknowledge(); In Failure Scenario: 1) Read the queue : Message message = receiver.receiveNoWait(); 2) Is message is not null then process it. 3) If there is an exception then call :session.recover() so as to redeliver the message again. I find that once I read the message from the queue it just gets lost. I dont see any entry in the DLQ as well. This is what i have configured on the messaging-service.xml <attribute name="DefaultDLQ">jboss.messaging.destination:service=Queue,name=DLQ</attribute> 
 
 <!-- The default maximum number of times to attempt delivery of a message before sending to the DLQ (if configured).
 This can be overridden on a per destinatin basis -->
 
 <attribute name="DefaultMaxDeliveryAttempts">10</attribute>
 
 <!-- The default Expiry Queue to use for destinations. This can be overridden on a per destinatin basis -->
 
 <attribute name="DefaultExpiryQueue">jboss.messaging.destination:service=Queue,name=ExpiryQueue</attribute>
 
 <!-- The default redelivery delay to impose. This can be overridden on a per destination basis -->
 
 <attribute name="DefaultRedeliveryDelay">50</attribute>
 
- 
        5. Re: Message Redelivery not working. .mp911de Jul 5, 2011 2:28 PM (in response to nadiafern)Hmmm...strange. I used redelivery with MessageDriven beans in a transactional context. I looked up the javadoc for CLIENT_ACKNOWLEDGE and it says: With this acknowledgment mode, the client acknowledges a consumed message by calling the message's acknowledgemethod. Acknowledging a consumed message acknowledges all messages that the session has consumed. (see http://download.oracle.com/javaee/5/api/javax/jms/Session.html#CLIENT_ACKNOWLEDGE)Don't know, whether this behavior is fine for all use cases. Have you tried to use JMS in a transacted mode? If you need the way you use it, i don't have any further ideas, sorry. 
- 
        6. Re: Message Redelivery not working. .nadiafern Jul 6, 2011 1:06 PM (in response to mp911de)I will try to use JMS in a transacted mode . Will let you know what I find but i think this is the issue. Thanks Mark for all your help on this issue. 
 
    