amerykanin
amerykanin

Reputation: 255

Weblogic JMS unit of work - groups of messages

I'm using Weblogic JMS. What I'd like to do is:

a) producer A produces JMS messages and put them on the queue ( groupA )
b) when processing each message from groupA I want to generate another messages ( groupB )

I've got 16 workers to process this messages.

Now, how I can ensure, that all messages from groupA will be processed before any message from groupB ?

Upvotes: 1

Views: 829

Answers (1)

andyfinch
andyfinch

Reputation: 1332

A bit late here but hopefully this will help anyone with the same issue. GroupA is effectively an Intermediate Destination. The JMS queue should have the default value of Pass-Through in the Unit-of-Work (UOW) Message Handling Policy setting. As your MDB processes these messages it needs to get the Unit of Work jms properties and reset them on the new message being sent for GroupB. This jms queue should have Unit-of-Work (UOW) Message Handling Policy set to Single Message Delivery. When the messages are received on this jms queue they will not be processed until all messages for a unit of work group are present i.e. all sequence numbers 1,2,3 etc and an end of message identifier. Once they are all present the mdb will consume them as 1 object message and the individual messages will be contained in a List. It is then your job to code to iterate the list and process as you need.

Weblogic Docs here

Upvotes: 3

Related Questions