Tuesday 15 January 2013

activemq - Losing messages in processors on broker restart -



activemq - Losing messages in processors on broker restart -

in previous message looking solution handle incoming messages in parallel. after lot of trial , error, think might have working solution.

however, 1 of requirements of platform i'm working on, messages beingness processed need "restarted" or "re-queued" in case of abrupt broker restart.

while testing, have succesfully started several processors @ 1 time perform unit-of-work per message. found when abruptly restarting broker, message beingness "worked on" within processor lost. however, when processor throws deliberate exception, message redelivered queue.

how can safeguard message while it's beingness processed (and unit-of-work has not finished)? advise highly appreciated.

note: final implementation using master-master setup of 2 identical brokers behind tcp load-balancer.

in order preserve message must utilize transactions persistent messaging. without transacted sessions not exception scenarios covered, if using default auto_acknowledge, tells broker have consumed message, go head , delete message has been delivered. why when restart broker lose message. there no other way around this.

assuming have transactions set properly, there no reason should not able process in parallel. this blog bit older now, still total of info sure setting transactions properly.

activemq processor

No comments:

Post a Comment