Take a look at how a poison pill can be used in a message queue and the benefit it brings. Then review how this might look like in a simple java application.
Please like, subscribe and leave a comment to let me know what you think!
Visit my website for all my blogs and videos on software engineering: www.aneesh.co.uk
Icon made by FreePik from www.flaticon.com