|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQCB with timeout |
« View previous topic :: View next topic » |
Author |
Message
|
Rush124 |
Posted: Thu Dec 11, 2014 3:06 am Post subject: MQCB with timeout |
|
|
Novice
Joined: 05 Aug 2014 Posts: 19
|
I 'm registering an event handler function using MQCB and the starting the callback using MQCTL with MQOP_START_WAIT.
I have used MQOP_START_WAIT, since I want to keep the callback in the same Thread. (This is because I want to handle threads by my self.)
I have encountered an issue due to the above option.
I need to Suspend the CallBack after a particular time. (this is because, I need to stop listing to a particular queue after a particular time and hence need to deregister the queue).
Is there an option where I can introduce a TimeOut functionality to the callback.
Thanks in Advance. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 11, 2014 5:17 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'm probably a little confused here, but if you want to halt the callback, I would think that you would merely close the queue. |
|
Back to top |
|
 |
Rush124 |
Posted: Mon Dec 15, 2014 7:59 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2014 Posts: 19
|
mqjeff,
To close the queue, I need to get out of the CallBack. But when MQCTL with MQOP_START_WAIT is used, that thread is allocated only for the callback and cannot do anything else in that thread.
So What I need is "getting out of the callback after a particular time".
That is why I asked whether there is a "TimeOut" functionality in MQ.
And isn't there a way of stopping the callback without terminating the Thread?
(when MQOP_START_WAIT is used) |
|
Back to top |
|
 |
PaulClarke |
Posted: Tue Dec 16, 2014 12:44 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
You can use the WaitInterval value of the MQGMO passed to the MQCB to periodically get the callback function called after the timeout.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
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
|
|
|
|