Author |
Message
|
sssang_e |
Posted: Fri Mar 22, 2002 4:43 am Post subject: |
|
|
Novice
Joined: 21 Mar 2002 Posts: 15
|
Hi,
I am little confused with MQ Series handling in multi threaded environment.
The scenario is that,
I have a server that puts multiple messages(has to be processed together by the client) one by one in the Queue.
I have a 2 client programs that listens to the queue.
The requirement is that the same client has to get the messages that is put by the server.
That is the multiple messages put on the queue by the server has to be processed together by the same client.
Another set of messages (belonging to the same group) can be processed by another client.
I understand that we can put all the messages into the same queue by using MPUT.
But can the MGET be configured or the client be configured such that all the messages are read by the same client.
Thanks in Advance for your help.
Cheers,
Sangs |
|
Back to top |
|
 |
mrlinux |
Posted: Fri Mar 22, 2002 5:50 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Are you using MQSeries message segmenting ??? If so that would handle it put the client apps would have to be modified to get them.
_________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
jfluitsm |
Posted: Fri Mar 22, 2002 9:08 am Post subject: |
|
|
Disciple
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
|
Hi Sangs,
You have to put these messages in a group.
On the client side you have to get these messages with the option MQGMO_COMPLETE_MSG, this forces the get to wait until the group is complete.
Please read the books (programming guide will be a good start) about goups and segmentation as there are more issues to worry about (such as logical and physical ordering).
_________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6 |
|
Back to top |
|
 |
mqonnet |
Posted: Sun Mar 24, 2002 8:42 pm Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
From what i understand you want to Get messages from only one queue, but want to distinguish between the messages destined to be picked up by Client 1 and Client 2.
There are numerous ways to do this. You could set a specific MSGId for Client 1 and another for Client 2. Make the Get wait for their respective Msgid's. Or you could as well use Priority as the basis. There are many more ways of achieving this task.
Hope this helps.
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
sssang_e |
Posted: Mon Mar 25, 2002 9:23 pm Post subject: |
|
|
Novice
Joined: 21 Mar 2002 Posts: 15
|
Hi All,
Thanks for your valuable replies.
Actually any of my 2 clients can read the message from the same queue.
But all the messages belonging to the same group must be read fully by either
client1 or client2.
Will get back to you later.
Sangs
|
|
Back to top |
|
 |
sssang_e |
Posted: Wed Mar 27, 2002 2:30 am Post subject: |
|
|
Novice
Joined: 21 Mar 2002 Posts: 15
|
|
Back to top |
|
 |
mqonnet |
Posted: Wed Mar 27, 2002 6:02 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
It sure works for me. There's surely something wrong that you are doing. Are you using the samples "as is" or have you modified it even a bit. On what platform are you testing this one.
Moreover, these are sample code from IBM and they would not have made it here, without being tested.
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
sssang_e |
Posted: Wed Mar 27, 2002 11:16 pm Post subject: |
|
|
Novice
Joined: 21 Mar 2002 Posts: 15
|
Hi,
I have not modified the program.
I use the system default queue, SYSTEM.DEFAULT.LOCAL.QUEUE in Sun Solaris
I ran the program and i entered "t" and pressed enter once, it reports,
Sample PUTGROUP start
target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
t
MQPUT ended with reason code 2173
I am using the code as it is. I did not modify it.
Sangs
|
|
Back to top |
|
 |
mqonnet |
Posted: Thu Mar 28, 2002 7:07 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
What version of MQ is it. Check to see if you are linking your app to the right library. Also i assume that you are running it as a server app rather than client.
For sanity purpose you could run the same sample "as is" on NT/2000. It sure works.
If you have the option of debugging, check to see if the pmo and md values are correct, before the put.
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
sssang_e |
Posted: Fri Mar 29, 2002 6:40 am Post subject: |
|
|
Novice
Joined: 21 Mar 2002 Posts: 15
|
Hi,
I am running the program as it is.
I am working on Sun Solaris platform.
The arguments I gave was
$putgroup SYSTE.DEFAULT.LOCAL.QUEUE
where putgroup is the name of the binary.
the MQ Series version is MQ5.1
Thanks
Sangs |
|
Back to top |
|
 |
sssang_e |
Posted: Sun Mar 31, 2002 9:13 pm Post subject: |
|
|
Novice
Joined: 21 Mar 2002 Posts: 15
|
Hi,
Any update on this?
Am I missing anything or any configuaration.
Thanks
Sangs |
|
Back to top |
|
 |
sutanu |
Posted: Sat Jul 16, 2005 11:58 am Post subject: |
|
|
Newbie
Joined: 22 Apr 2005 Posts: 9
|
Hi,
I'm a child to all these knowledegable persons.
I've a suggestion. While sending the data you can specify your own 'ApplOriginData' by its Set Method. Based on which you can retrieve when it returns.
Hope it helps. |
|
Back to top |
|
 |
|