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 » Event Callback creates a new thread

Post new topic  Reply to topic
 Event Callback creates a new thread « View previous topic :: View next topic » 
Author Message
Rush124
PostPosted: Mon Mar 09, 2015 10:33 pm    Post subject: Event Callback creates a new thread Reply with quote

Novice

Joined: 05 Aug 2014
Posts: 19

Hi,

I have used MQCB to register message consumers and a Event Callback against a Connection handle.

Then I start callbacks using MQCTL with MQOP_START_WAIT.

but when an event occurrs (Say "MQRC_RECONNECTING"), a new thread is created. It is possible to see creation of this thread, when application is run under gdb.

why this new thread is created? And is there a way of stopping the creation of new thread and capturing the event in the original thread which was created by application at the start up.

any help would be appreciated.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Tue Mar 10, 2015 12:31 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

You'll have to wait for the current MQ Development team to answer to give you the definitive answer. However, from memory, I believe that client reconnect always happens on a different reconnect thread. This is because the reconnect processing is entirely independent of the application processing. So, for example, the application could be in the middle of a DB/2 call or some long processing loop when it loses connection and it would still reconnect without being delayed by the application processing. The whole idea was that, as far as possible, it was 'under the covers' and the application need not know it was happening.

Of course if you want control over exactly when and where reconnect happens then there is nothing to stop you writing the reconnect logic in your own application. Then you could indeed put it around the MQCTL(START_WAIT) code. After all, it's not hard.

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 » Event Callback creates a new thread
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.