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 » General IBM MQ Support » MQCB with timeout

Post new topic  Reply to topic
 MQCB with timeout « View previous topic :: View next topic » 
Author Message
Rush124
PostPosted: Thu Dec 11, 2014 3:06 am    Post subject: MQCB with timeout Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 11, 2014 5:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Rush124
PostPosted: Mon Dec 15, 2014 7:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulClarke
PostPosted: Tue Dec 16, 2014 12:44 am    Post subject: Reply with quote

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
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 » General IBM MQ Support » MQCB with timeout
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.