I’m currently sending messages to an activemq. So until the connection is established to this queue the messages gets delivered. If there is a connection lost to the active mq the messages that are supposed to be sent are lost in this phase.
My solution to overcome this . Save all the messages to be sent in a DB, create a timer route and pick the message in a lot and then send to the active mq. Please note that the order of the messages needs to be in place. This implementation is coming at a cost as I will have to think about not picking the same messages again. If i think of maintaining the order what if a message picked up by the timer route is again undelivered as the connection was still down .
Please help me figure out is there a better solution which is provided by apache camel itself to streamline this functionality ? a configuration/setting such that during the disconnection with the activemq , all the messages are piled up in a cache and when connection is back , first the cache messages are sent and then the normal flow will continue.