I'm trying to send a message to a remote queue manager's local queue via a remote queue definition on my local queue manager. I have configured two channels that communicate correctly, a transmission queue that works well also, and a remote queue definition that specifies the remote queue manager's local queue. I used the API Exerciser to test the connections and was able to send a message using MPUT1. MPUT fails with the error 2045.
I'm trying in a very simple C++ application to send a STRING message to the remote queue via the remote queue definition.
ex code:
ImqQueueManager manager ;
ImqChannel * pchannel = 0 ;
ImqQueue *pqueue = new ImqQueue;
ImqMessage *pmsg = new ImqMessage;
// pchannel is all set up as is manager
manager.setChannelReference(pchannel);
manager.setName("LOCAL_QUEUE_MANAGER_NAME"
;
manager.connect(); // successful
pqueue->setConnectionReference(manager);
pqueue->setName("REMOTE_QUEUE_DEFINITION_NAME"
;
pqueue->setOpenOptions(MQOO_OUTPUT | MQOO_INPUT_SHARED |
MQOO_INQUIRE);
pmsg->setFormat(MQFMT_STRING);
pmsg->useFullBuffer("Hello world!", 12);
pqueue->put(*pmsg);
printf("%ld",pqueue->reasonCode());
It always prints out the failed reason code and the remote queue manager doesn't get it.
I could very well not understand the concept of a remote queue definition, so feel free to jump on me about that.
Any help or advice is appreciated. (BTW, I don't have access to the remote machine).
I'm trying in a very simple C++ application to send a STRING message to the remote queue via the remote queue definition.
ex code:
ImqQueueManager manager ;
ImqChannel * pchannel = 0 ;
ImqQueue *pqueue = new ImqQueue;
ImqMessage *pmsg = new ImqMessage;
// pchannel is all set up as is manager
manager.setChannelReference(pchannel);
manager.setName("LOCAL_QUEUE_MANAGER_NAME"
manager.connect(); // successful
pqueue->setConnectionReference(manager);
pqueue->setName("REMOTE_QUEUE_DEFINITION_NAME"
pqueue->setOpenOptions(MQOO_OUTPUT | MQOO_INPUT_SHARED |
MQOO_INQUIRE);
pmsg->setFormat(MQFMT_STRING);
pmsg->useFullBuffer("Hello world!", 12);
pqueue->put(*pmsg);
printf("%ld",pqueue->reasonCode());
It always prints out the failed reason code and the remote queue manager doesn't get it.
I could very well not understand the concept of a remote queue definition, so feel free to jump on me about that.
Any help or advice is appreciated. (BTW, I don't have access to the remote machine).