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 » Best place for the sending application to pass instance data

Post new topic  Reply to topic
 Best place for the sending application to pass instance data « View previous topic :: View next topic » 
Author Message
KeeferG
PostPosted: Wed Nov 17, 2004 6:13 am    Post subject: Best place for the sending application to pass instance data Reply with quote

Master

Joined: 15 Oct 2004
Posts: 215
Location: Basingstoke, UK

We are about to create an application with approx 100 threads putting to a queue. We want to have a way of putting data into the MD saying what thread it is so the the getting application can get messages by thread as it too will have approx 100 threads in a 1-1 mapping. We are contemplating setting a thread ID in the messageID or correlationID. Would this be the right place for it or is somewhere else better. We are not expecting back any replies so those fields are not being used.

Anyone have any views on this
_________________
Keith Guttridge
-----------------
Using MQ since 1995
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Wed Nov 17, 2004 7:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I'm not sure your design makes much sense.

That said, you could add an RFH header (preferably an MQRFH2). This is usually the best place to put application specific data, as it's a) a standard header with room for application data and b) very flexible in the amount of data it can hold and return.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
KeeferG
PostPosted: Wed Nov 17, 2004 7:25 am    Post subject: Reply with quote

Master

Joined: 15 Oct 2004
Posts: 215
Location: Basingstoke, UK

I agree with you on the design but the application already exist and we are adding a log/trace facility for each machine on the network reporting back to a single log/trace machine. Each machine will have its own queue on the log/trace machin and that wants to remove the messages by putting thread as each thread needs its own log file. The RFH2 would be what i would use if i didnt need to get them off the queue by thread.

May have a chat with the app guys to review the way their log/trace writer will work.

Cheers
_________________
Keith Guttridge
-----------------
Using MQ since 1995
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Wed Nov 17, 2004 9:12 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Sometimes brute force is the simplest and cleanest solution.

Define a queue for each thread. 100 threads hence 100 queues (i.e. 'ABC.T###.Q' where ### is the thread number) and you can use the ApplIdentityData field to pass data between the sending and the receiving applications (field size is 32 bytes).

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
kirani
PostPosted: Wed Nov 17, 2004 9:31 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Since you are planning on reading a specific message from the queue you cannot use MQRFH2 header. Storing the thread-id in MsgId or CorrelId column sounds good to me.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
KeeferG
PostPosted: Wed Nov 17, 2004 9:38 am    Post subject: Reply with quote

Master

Joined: 15 Oct 2004
Posts: 215
Location: Basingstoke, UK

That was the way they were originally thinking but that would have added nearly 1600 queues by the time it was done due to the number of machines being monitored and contingency queues.

I think I need to investigate the threading model of the receiving application and its need for serialisation a bit more.
_________________
Keith Guttridge
-----------------
Using MQ since 1995
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Best place for the sending application to pass instance data
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.