|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem with 2 queues sharing 1 channel, please help !!! |
« View previous topic :: View next topic » |
Author |
Message
|
p094606 |
Posted: Tue May 15, 2007 11:38 am Post subject: Problem with 2 queues sharing 1 channel, please help !!! |
|
|
Newbie
Joined: 15 May 2007 Posts: 2
|
I'm using MQSeries Java API. In my program, I have 2 threads: one getting messages from Queue 1, the other putting messages to Queue 2. Both queues share the same channel. The putting msg call seems to depend on the waiting msg time set on the getting msg call. For example, if I set timeToWait value to 5 seconds in my get msg in Thread1, the put msg call takes sth like 5 seconds to finish in Thread2.
This is my MQGet option in Thread 1
MQC.MQGMO_WAIT | MQC.MQGMO_NO_SYNCPOINT | MQC.MQGMO_FAIL_IF_QUIESCING;
This is my MQPut option in Thread 2
MQC.MQPMO_NO_SYNCPOINT | MQC.MQPMO_FAIL_IF_QUIESCING; message.persistence = MQC.MQPER_NOT_PERSISTENT;
I'm using the same channel when connecting to both queues, is this the problem? Can some please help? |
|
Back to top |
|
 |
dhanaraj |
Posted: Tue May 15, 2007 12:01 pm Post subject: |
|
|
 Voyager
Joined: 10 Aug 2004 Posts: 92
|
That means u r using Request and Response in the same Queue right?
Why u want to use 1 queue for request and response?
But its not a problem u can use request and response in the same queue.
U can't use for this asynchronously transactions. That means u will process at a time one request. |
|
Back to top |
|
 |
p094606 |
Posted: Tue May 15, 2007 12:20 pm Post subject: |
|
|
Newbie
Joined: 15 May 2007 Posts: 2
|
I don't know much about MQ. I'm not sure what you mean by using "request & response on the same Q". My Thread 1 runs in a while loop, it keeps retrieving msgs from Q1 and put it in a vector. Thread2 also runs in a while loop that picks up msgs from the vector, process it, and send reponse back to Q2. But the MQPUT call in T2 seems to depend on the MQGET call's MQGetMessageOptions.waitInterval in T1. |
|
Back to top |
|
 |
dhanaraj |
Posted: Tue May 15, 2007 12:33 pm Post subject: |
|
|
 Voyager
Joined: 10 Aug 2004 Posts: 92
|
Quote: |
That means u r using Request and Response in the same Queue ?right |
Sorry I miss understood.
Quote: |
I'm using the same channel when connecting to both queues, is this the problem? |
No its not a problem. U can use the same MQI channel for MQPUT and MQGET
Thanks
Dhanaraj |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue May 15, 2007 12:40 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You should be using different connection objects, though. even if to the same channel. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|