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 Discussion » MQCTL fails with MQRC_NO_CALLBACKS_ACTIVE

Post new topic  Reply to topic
 MQCTL fails with MQRC_NO_CALLBACKS_ACTIVE « View previous topic :: View next topic » 
Author Message
Rush124
PostPosted: Tue Nov 04, 2014 11:22 pm    Post subject: MQCTL fails with MQRC_NO_CALLBACKS_ACTIVE Reply with quote

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
View user's profile Send private message
PaulClarke
PostPosted: Wed Nov 05, 2014 1:02 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Rush124
PostPosted: Wed Nov 05, 2014 1:20 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulClarke
PostPosted: Wed Nov 05, 2014 4:18 am    Post subject: Reply with quote

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
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 Discussion » MQCTL fails with MQRC_NO_CALLBACKS_ACTIVE
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.