ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » MGET in multi threaded/Client environment - urgent

Post new topic  Reply to topic
 MGET in multi threaded/Client environment - urgent « View previous topic :: View next topic » 
Author Message
sssang_e
PostPosted: Fri Mar 22, 2002 4:43 am    Post subject: Reply with quote

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
View user's profile Send private message
mrlinux
PostPosted: Fri Mar 22, 2002 5:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jfluitsm
PostPosted: Fri Mar 22, 2002 9:08 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mqonnet
PostPosted: Sun Mar 24, 2002 8:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sssang_e
PostPosted: Mon Mar 25, 2002 9:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
sssang_e
PostPosted: Wed Mar 27, 2002 2:30 am    Post subject: Reply with quote

Novice

Joined: 21 Mar 2002
Posts: 15

Hi,

I tried the sample programs in
http://www.mqseries.net/pafiledb203/pafiledb.php?PHPSESSID=f1e98b2b7e2625e75c1381407fb1d10e&action=viewfile&fid=26&id=2 and
http://www.mqseries.net/pafiledb203/pafiledb.php?PHPSESSID=f1e98b2b7e2625e75c1381407fb1d10e&action=viewfile&fid=22&id=2

But when i run that sample,
after entering data for 1st message group it reports,
MQPUT ended with reason code 2173. and quits
2173 refers to invalid Put Message Options structure .
In the program the pmo is initialized to the default values and the version number(MQPMO_VERSION_2) and MQPMO_LOGICAL_ORDER | MQPMO_SYNCPOINT are set.

Let me know if i am missing anything here?

Thanks in advance
Sangs
Back to top
View user's profile Send private message
mqonnet
PostPosted: Wed Mar 27, 2002 6:02 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sssang_e
PostPosted: Wed Mar 27, 2002 11:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
mqonnet
PostPosted: Thu Mar 28, 2002 7:07 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sssang_e
PostPosted: Fri Mar 29, 2002 6:40 am    Post subject: Reply with quote

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
View user's profile Send private message
sssang_e
PostPosted: Sun Mar 31, 2002 9:13 pm    Post subject: Reply with quote

Novice

Joined: 21 Mar 2002
Posts: 15

Hi,

Any update on this?

Am I missing anything or any configuaration.

Thanks
Sangs
Back to top
View user's profile Send private message
sutanu
PostPosted: Sat Jul 16, 2005 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MGET in multi threaded/Client environment - urgent
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.