So how do you avoid poi­son mes­sages?

Poi­son mes­sages: if you're in op­er­a­tions then you've prob­a­bly been wok­en up for one of these. If you're a de­vel­op­er, you've prob­a­bly been bashed by op­er­a­tions about these. And if you're a man­ag­er, you've prob­a­bly seen these in­ci­dents pop up soon­er or lat­er. So what are they, and how do you avoid them?

A poi­son mes­sage is a re­peat­ed­ly re­de­liv­ered mes­sage that fails be­ing processed every time, be­cause of in­her­ent rea­sons. Typ­i­cal­ly, this is due to bad mes­sage con­tent. A poi­son mes­sage has the po­ten­tial to bring mes­sage pro­cess­ing to a halt be­cause the sys­tem finds it­self retry­ing the same sin­gle mes­sage every time.

Not all re­de­liv­ered mes­sages are poi­son mes­sages: if a mes­sage is re­de­liv­ered due to a tran­sient er­ror then every­thing is fine. In that case, the mes­sage will be processed af­ter at most a few re­tries.

Poi­son mes­sages can be avoid­ed by de­sign­ing an ap­pro­pri­ate ex­cep­tion hi­er­ar­chy in the ap­pli­ca­tion, so that only tran­sient ex­cep­tions are com­ing out of the ap­pli­ca­tion. For non-tran­sient ex­cep­tions, the mes­sage can be logged and re­moved from the queue be­cause retry does not make sense.

This so­lu­tion works, but can be im­prac­ti­cal for pro­duc­tion sce­nar­ios where you are faced with the facts (and re­design­ing the ex­cep­tion hi­er­ar­chy is not an op­tion). Con­tact us if you would like a free re­view of your con­fig­u­ra­tion re­gard­ing poi­son mes­sages!
RSS

Comments

Add a comment

Corporate Information

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

Contact Us

Copyright 2026 Atomikos BVBA | Our Privacy Policy
By using this site you agree to our cookies. More info. That's Fine