1 Reply Latest reply on Dec 3, 2012 3:45 AM by Andy Taylor

    Divert resets message expiration to 0 , What is the best way to propagate expiration across Divert ?

    Dhaval Rami Newbie

      HornetQ version : 2.2.14.Final


      I have a setup; in which Messages are sent to a “main.queue” there is a non-exclusive divert configured between “main.queue” and “divert.queue”, so all messages from “main.queue” are copied to “divert.queue”

      In my client I set “expiration” time in message header , send message to “main.queue”, but when these messages are copied to “divert.queue”,  I found that “expiration” is reset to “0” by the “Divert” ( which means they will never expire from “divert.queue”),


      • Shouldn’t the message also expire from “divert.queue” if its “expiration” is set by client ?
      • What would be the intent of setting the expiration to 0 for diverted messages?   
      • What is the best way to propagate the expiration to the divert.queue?


      Code Reference: HornetQ-2.2.14.final

      The divert implementation shows


           DivertImpl.route() ->     ServerMessageImpl.setOriginalHeaders()