3 Replies Latest reply on Aug 18, 2011 7:23 AM by leosbitto

    Set Redelivery on a Per Message Basis

    sergiu_pienar

      Hi,

       

      I was wondering if one can set up a maxDeliveryAttempts on a per message basis(i.e. have an attribute that specifies how many times a message should be reprocessed if the original processing has failed).


      In my app there are times when I only want a message to be proceesed once and if that initial processing fails the message should be directly discarded. However there are numerous other situations in which I want the messages to be reprocessed for a number of attempts(max-delivery-attempts) which is set in hornetq-configuration.xml for which this value is set to 5.

       

      Can I somehow add a max-delivery-attempts of 1 to each message I want to be processed only once ?

       

      Thank you.