Posted: Wed Mar 19, 2003 8:38 am Post subject: ensuring client program (MQ Client Classes) is thread safe?
Novice
Joined: 05 Sep 2002 Posts: 11 Location: Chicago
Hi there,
Can anyone help me with what restrictions I need to adhere to in order to ensure that my client program is thread safe?
My intention is to have one thread getting messages from the input queue, farming off the processing to worker threads as each message comes in.... the question is if there is a recommended way for me to send a response back from each worker thread when the processing is finished.
1) Does each worker thread have to create it's own connections (Queue Manager & Queues)?
2) Can I just keep a pool of objects that have a Queue Manager connection (and a connection to the output queue) and just get each worker thread to request one of these objects from the pool in order to return the response message. This will ensure that only one thread is ever using a particular connection at any one time. Is this enough?
Any suggestions?
Thanks in advance
Eddie
P.S. Which document should I be looking at that describes all these issues about threads?
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