|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
get mesages on groupid that runs into multiple unit of work |
« View previous topic :: View next topic » |
Author |
Message
|
kolguri |
Posted: Wed Jan 19, 2011 7:18 pm Post subject: |
|
|
Newbie
Joined: 18 Jan 2011 Posts: 9
|
Hi aI gave those options already .
ALso I sent same message to remote queue and they are processed by java app sucessfully. same messages when retrieved from mainframe
are not comming in wrong order though same options are mentioned in mainframe and java.
Im suspecting if there is some thing wrong with queue options. Do we need to specify any additional options while creating this queue.
My queue options are :
Put enabled . . . . . . . . : Y Y=Yes
Get enabled . . . . . . . . : Y Y=Yes
Usage . . . . . . . . . . . : N N=Nor
Storage class . . . . . . . : DEFAULT
CF structure name . . . . . :
Dynamic queue type . . . . : N N=Non
P=Per
Page set identifier . . . . : 1
Cluster name . . . . . . . :
Cluster namelist name . . . :
Default bind . . . . . . . : O
Cluster workload rank . . . : 0
Cluster workload priority . : 0
Cluster workload queue use : Q
Default persistence . . . . : Y
Default priority . . . . . : 0
Message delivery sequence . : F
Permit shared access . . . : Y
Default share option . . . : S
Index type . . . . . . . . : N
Trigger type . . . . . . : F
Trigger set . . . . . . : N
Trigger message priority : 0
Trigger depth . . . . . : 1
Thanks |
|
Back to top |
|
 |
kolguri |
Posted: Wed Jan 19, 2011 8:11 pm Post subject: |
|
|
Newbie
Joined: 18 Jan 2011 Posts: 9
|
Also regarding the mq open options for get im giving MQOO-INPUT-SHARED + MQOO-BROWSE + MQOO-INQUIRE. Please corrct me if im wrong |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jan 19, 2011 10:00 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
are not comming in wrong order though same options are mentioned in mainframe and java. |
So, you mean that the consuming application gets the messages (plural - more than 1 message) arrive in the correct LOGICAL ORDER?
Quote: |
Also regarding the mq open options for get im giving MQOO-INPUT-SHARED + MQOO-BROWSE + MQOO-INQUIRE. Please corrct me if im wrong |
These look ok. It allows the app to browse and inquire. However, INPUT SHARED allows other apps to open the queue for input, AND get messages. . If you want only one app to consume all of the messages (even though they might be interleaved with messages destined for another app),
Quote: |
ADD MQMO-MATCH-GROUP-ID TO MQGMO-MATCHOPTIONS which sets match-group-id to match options which should then get messages with that group. |
These options will consume only those messages that explicitly match GroupId.
If your intent is to have the application is to consume the messages in the group in LOGICAL order, NO do not specify match options.
I'd strongly suggest reading the APR and APG manuals for these options. I believe there is a section entitled "consuming messages in the same order that they were put..." _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jan 19, 2011 10:25 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You need to also determine whether you are really intent on browsing or consuming the messages and determine your transaction boundary.
I suggest that on the first get you specify message seq =1 and add seq to your match options... This is to avoid getting message with seq 2 if another process is currently processing message with seq 1.
So any message beyond seq 1 is accessed by groupid which got initialized while retrieving seq 1. Also you might want to ensure that the queue is indexed by groupid. There might be some assumption being made in your zOS program that are invalid if the queue is not indexed... (like get next will give you the next message in the group...)
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kolguri |
Posted: Thu Jan 20, 2011 9:31 am Post subject: |
|
|
Newbie
Joined: 18 Jan 2011 Posts: 9
|
Im performing the get loop UNTIL (MQGMO-GROUPSTATUS = MQGS-LAST-MSG-IN-GROUP).
now I tried displaying MQGMO-GROUPSTATUS after each get and it is spaces,which is not as expected. do we need to manually move group status or is ther any other variable where we need to check for group status after each get?
I feel MQGMO_GROUPSTATUS should get populated each time we retrieve message but it is spaces always in my code. Can you guide me to correct it. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Jan 20, 2011 10:35 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
and it is spaces,which is not as expected. |
It would help in future posts if you specify exactly what you expected, why you expected it, what you actually received, and where you saw it. I don't want to guess.
This is from the WMQ Constants manual:
MQGS_* (Group Status)
MQGS_NOT_IN_GROUP 'b'
MQGS_MSG_IN_GROUP 'G'
MQGS_LAST_MSG_IN_GROUP 'L'
From this, I'm taking a guess that the message your app consumed was not in a message group.
Was there a GroupId in the MQMD that your app consumed from the queue?
Did the app that created the messages create a group? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Jan 20, 2011 12:00 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
I've been reading the OP...
How is the GroupId being created? Does the putting app create a GroupId of its own? Or, does the app that puts the messages ask the qmgr generate a unique GroupId with MQPMO_NEW_MSG_ID?
Does a single thread put messages to the exact same GroupId? Or do multiple threads use the same GroupId? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|