Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reply Message Lost: Where it end up? 1

Status
Not open for further replies.

HappyBB

Programmer
Jan 19, 2001
4
US
Hi, everybody,

We set up two MQSeries servers on NT, and two-way message channels(both sides have a sender and receiver channel) to implement two-way communication. Sending a request message from one server to the other and sending a reply back. Right now, the request message can be successfully sent and retrieved, but when the reaply message is sending back, we call MQPUT function and got successful return code, but the message is not showing up on the destination queue. And we checked the transmit queue and deadletter queue on sending side, and deadletter queue on receiving side, no messages either. The weird thing is, if we block the channel for sending the reply message, the message is still not in either the transmit queue or the dead letter queue. Where is the message? Could anybody help?

thanks a lot,

happybb
 
hi HappyBB,

how do you defined the replyq? r u using remoteqmgr alias? can u please provide in detail the queue definition for reply?

regards
 
The reply queue is defined as a local queue on the request sending site. The reply queue name and reply queue manager name is included in the message header of the message we send from the request sending site. We don't have a remote queue defined on the reply sending site which pointing to the real reply queue on the request sending site. When we send the reply message, we basically get the name of the reply queue name, reply queue manager name from the request message received on the request receiving site, and use MQOPEN to remotely open the real reply queue on the reply receiving site(which is the request sending site too) by specidying the name of the reply queue and the name of the reply queue manager and no error ocuured, then we call MQPUT to send the message to the reply queue. Is there any
error in our queue definitions here? Thanks for all the help.
 
hi HappyBB,

did u define xmitq to reply back to the sender? I dont see any xmitq been defined. few ways to solve ur problem and probably let me guide to you how to define the process flow from sender to receiver and reply back to the sender. i'm going to show how can we make use the aliasq here.

at the sender/requester:-
- define aliasq for the localq to receive the reply
eg ABC.RPL.01 and the targetq should be
ABC.RPL.D1.01
- define localq ABC.RPL.D1.01
- u can specify the aliasq ABC.RPL.01 on the MQMD REplttoQ
name. leave the ReplytoQMgr name blank
- define remoteq alias for Qmanager. name it as
QM1.01 and remoteq mgr as QM1. the rest should be blank

now you did mqput to the queue and the receiver should reply based on the replytoqname given on the mqmd header.

at the receiver end, to reply back the message, put the message to the aliasq:-
- define the aliasq ABC.RPL.01 and targetq should be
ABC.RPL.D1.01
- define the remoteq ABC.RPL.D1.01 and remoteq name as
ABC.RPL.01, remoteqmr as QM.01. leave the field
for xmitq as blank. but please make sure your QM.01
name is the same name as xmitq defined.

the reason for using aliasq is to make the application easier when u requires to point the program to other queues or managers.

i hope above guide will help you. please let me know if it still does not solve ur problem.

regards.
 
hi HappyBB,

i missed something. u should include replytoqmgr in the mqmd from the sender. replqytoqmgr = aliasqmgr defined at the sender.

regards.
 
Hi, Johari,

Thanks for the useful advice. It helped. But I still got several questions about it. Since our system was developed about two years ago and been working fine for some time between these two sender/receiver machines. The problem just appeared. Let me first described our q/qmgr set up in details:

at Sender Site, we have:
1)qmgr: request.qmgr
2)a local def of a remote queue: request.q with rqmgr and rqname properties set to the receiver site's local queue(request.q) and qmgr(reply.qmgr) xmitq(TRANSMIT1.QUEUE)
3)reply.q(a local queue, which is the queue that suppose to get the reply message)
4) TRANSMIT1.QUEUE: local queue used as xmitq to send the request message.


at receiver site, we have:
1) qmgr: reply.qmgr
2) local queue: request.queue(which is the destination queue of the request message sent from sender)
3) xmitq: request.qmgr (same name as the qmanager on sender site, which is the xmitq for sending the reply message)

The messages flow are like the following:
1) A MQSeries client machine connecting to the Sender send a request to request.queue, which specify the replyToQ(reply.q), replyToQMGR(request.qmgr)in MQMD header.

2) Another MQSeries Client connecting to receiver site, check the message from local queue: request.queue, remove it, and then send reply to the replytoQ(reply.queue) on sender machine. This is the part where problem occurs. Since the client machine is connecting to the receiver site, when it need to send reply to sender site, our program basically call MQOPEN(specify sender site reply.queue and request.qmgr in the MQOD parameters)to remote open the queue, and return value is OK. Then our program calls the MQPUT to send the reply message. And the return value of this call is also OK.

3) Then we check the reply message on the reply.queue at receiver site, but nothing there, but nothing there. Also nothing in the xmitq on the receiver site, which has the same name as the qmgr on the sender site)

Is there any error in our definitions of the q/qmgr? I hope we could keep our current setting as much as possible.

Thanks for the help. I really appreciate it.




 
hi HappyBB,


is there any error message on the mq error logs everytime u put the message?

I dont know why no remoteq defined on the receiver site. And 1'm not so sure and have no idea why ur MQOPEN/PUT rc was ok whenever u did it on the queue which is residing on the other machine. what i can see now, u need the remoteq to be defined at the receiver site and put the message into the remoteq. thats all i can suggest. but if you want to make use the new ways of design ie make use the aliasq, please let me know so i can guide you how to do it.

probably other members in this forum can share the ideas to solve this problem.

regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top