Wednesday, June 19, 2019

Get Your Internal Queues Under Control in Java

There are many good reasons why you should use internal queues in your program. Most common patterns contain the same principle — divide your processing into two separate parts, and then, every part can work autonomously. The queue is the best way to transfer an object from one thread to another and ensure proper visibility of all fields belonging to a particular transferred object. This common pattern is called the Consumer-Producer pattern. If you want to read more about that pattern, please visit my previous post Boost of Parallelism Using Producer-Consumer Pattern.

However, today, I would like to focus more on potential troubles, monitoring, and how to avoid losing messages in your program.



from DZone.com Feed http://bit.ly/31KMNjC

No comments:

Post a Comment