|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQCTL fails with MQRC_NO_CALLBACKS_ACTIVE |
« View previous topic :: View next topic » |
Author |
Message
|
Rush124 |
Posted: Tue Nov 04, 2014 11:22 pm Post subject: MQCTL fails with MQRC_NO_CALLBACKS_ACTIVE |
|
|
Novice
Joined: 05 Aug 2014 Posts: 19
|
Hi,
I am trying to set a callback for set of queues.(this is done from a Custom Thread created by my application - say Thread1)
Here, first I'm Registering the callback function using
MQCB (Hconn, Operation, CallbackDesc, Hobj, MsgDesc , GetMsgOpts, CompCode, Reason).
Then using a another Custom thread (say Thread2), I'm
Opening all those queues in for Reading.(MQOO_INPUT_AS_Q_DEF|MQOO_FAIL_IF_QUIESCING)
Then in Thread1, I'm starting the callback using,
MQCTL (Hconn, Operation,ControlOpts, CompCode, Reason ) .
(Here I'm using MQOP_START_WAIT as the mode of operation )
This returns a error with reason code 2446 (MQRC_NO_CALLBACKS_ACTIVE).
What am I doing wrong here?
Thanks in Advance. |
|
Back to top |
|
 |
PaulClarke |
Posted: Wed Nov 05, 2014 1:02 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
This does seem an odd order to do things. You can't register for callback, then open the queues and then start consumer.
I would expect the registers to fail since you weren't giving them an MQHOBJ to play with.
I would expect a sequence along the lines of...
MQCONN x 1
{ MQOPEN + MQCB } x n
MQCTL(START) x 1
I'm also not sure why you are doing things on different threads. You are, I hope, always using the same MQHCONN.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
Rush124 |
Posted: Wed Nov 05, 2014 1:20 am Post subject: |
|
|
Novice
Joined: 05 Aug 2014 Posts: 19
|
Sorry for not stating the Problem correctly.
My Actual problem is MQCB returns a error Code with 2036 (MQRC_NOT_OPEN_FOR_BROWSE)
Here I' m using two MQHCONNs.
In Thread1, First I'm connecting to QueueManager.(Say MQHCONN is Hcon1) .Then I'm Openning Queue with Browse Option
(MQOO_INPUT_AS_Q_DEF | MQOO_FAIL_IF_QUIESCING | MQOO_BROWSE).
(Say MQHOBJ is MQHOBJ1)
Then, in Thread2, I' Connecting again to the QueueManager. (Here a new MQHCONN is used) and Openning Queue with Read option
(MQOO_INPUT_AS_Q_DEF | MQOO_FAIL_IF_QUIESCING)
After that , in Thread1 I'm issuing MQCB with Hcon1 and MQHOBJ1. |
|
Back to top |
|
 |
PaulClarke |
Posted: Wed Nov 05, 2014 4:18 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Well, I would double check the HCONNs and HOBJs you are using because clearly MQ does not think you are passing in a HOBJ that you have opened for browse on this HCONN.
It is hard for anyone else to debug this for you since we don't have access to the code. Might I suggest you simplify it a bit first. Just do it on one thread and one HCONN before you complicate things by introducing a second thread and second HCONN. You haven't explained why you need either.
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
|
|
|
|