Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Master Worker Pattern in JMS

DZone's Guide to

Master Worker Pattern in JMS

· Java Zone ·
Free Resource

The CMS developers love. Open Source, API-first and Enterprise-grade. Try BloomReach CMS for free.

A user asked a recent question on SO for their "application which needs to process huge file stored in DB in multiple rows." Here were the steps he wanted to trigger (he didn't know how to get step 2 going):

   1.   One part of the system receives the file in chunks and keeps it in the DB.

   2.   The next step logically splits this file into N partitions and sends the metadata of the partitions as JMS Messages.

   3.   And then the JMS clients process their part of the file, and when they are finished they update the status of the task on another table in the DB.

There were a couple answers to this question.  One user suggested the Blackboard Pattern.   Javalobby has an article about JGroups that tells how to implement a similar model.  One user suggested that.

What would you use?


BloomReach CMS: the API-first CMS of the future. Open-source & enterprise-grade. - As a Java developer, you will feel at home using Maven builds and your favorite IDE (e.g. Eclipse or IntelliJ) and continuous integration server (e.g. Jenkins). Manage your Java objects using Spring Framework, write your templates in JSP or Freemarker. Try for free.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}