|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Event Callback creates a new thread |
« View previous topic :: View next topic » |
Author |
Message
|
Rush124 |
Posted: Mon Mar 09, 2015 10:33 pm Post subject: Event Callback creates a new thread |
|
|
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 |
|
 |
PaulClarke |
Posted: Tue Mar 10, 2015 12:31 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|