Author |
Message
|
ritesh_pande |
Posted: Thu Dec 08, 2005 4:01 am Post subject: Acknowledgement method |
|
|
Novice
Joined: 05 Dec 2005 Posts: 11
|
Hi,
I m using mqseries using java. My sender channel is at different location and reciever is at different location.
I want to know at sender side whether reciever channel got the data or not.
Is there any method using which sender will get the acknowledgement from the reciever.
thnx in adv.
regards,
ritesh  |
|
Back to top |
|
 |
fschofer |
Posted: Thu Dec 08, 2005 4:08 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi,
search for COA / COD
Greetings
Frank |
|
Back to top |
|
 |
ritesh_pande |
Posted: Thu Dec 08, 2005 4:32 am Post subject: |
|
|
Novice
Joined: 05 Dec 2005 Posts: 11
|
hi,
thnx a lot frank for ur valuable suggestion.
pls suggest me the link for COA configuration manual.
regards,
ritesh |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Dec 08, 2005 5:03 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Try searching here for COA and the manual is either the application programming guide or reference. However, I'd suggest you look at both. |
|
Back to top |
|
 |
ritesh_pande |
Posted: Thu Dec 08, 2005 5:51 am Post subject: |
|
|
Novice
Joined: 05 Dec 2005 Posts: 11
|
hi,
thnx a lot for ur help. i searched for COA and COD but i m not getting the proper solution for COA and COD.
As i m new in mqseries i wud like to know the where to put the code for COA whether it is at sender side or receiver side.
I am having separate application for both writing and reading messages.
It's very urgent !!
regards,
ritesh |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Dec 08, 2005 7:34 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Take a look at the manuals that I referenced. You'll find the information that you are looking for. |
|
Back to top |
|
 |
ritesh_pande |
Posted: Thu Dec 08, 2005 8:20 pm Post subject: |
|
|
Novice
Joined: 05 Dec 2005 Posts: 11
|
hi all,
thanks a lot for all ur suggestions.
here is my scenario
i m having sender qmgr in which i have create one remote queue and one transmission queue, i have created one svrconn channel and one sender channel.i have developed separate application for accessing sender qmgr and sending data.
at receiver side i have create one receiver qmgr, queue and one receiver channel for receiving data. all are created using wsmq explorer. i m having one java application for reading the data from mqseries.
now my question is where to use COA/COD. whether it is at sender side or receiver side. i searched the forum but i m not getting how and where to use this.
pls don't mind as i m new to mqseries.
regards,
ritesh |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Dec 08, 2005 9:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You specify the COA/COD options before sending the message.
So it is the sender side that specifies these options.
Enjoy  |
|
Back to top |
|
 |
ritesh_pande |
Posted: Thu Dec 08, 2005 9:55 pm Post subject: |
|
|
Novice
Joined: 05 Dec 2005 Posts: 11
|
hi,
this is what i m doing at sender side.
qMgr = new MQQueueManager("sender");
int openOptions = MQC.MQOO_OUTPUT +MQC.MQOO_FAIL_IF_QUIESCING;
MQQueue myQueue = qMgr.accessQueue(remote_queue, openOptions, null, null, null);
MQMessage myMessage = new MQMessage();
myMessage.messageType = MQC.MQMT_REPORT;
myMessage.report = MQC.MQRO_COA ;
myMessage.feedback = MQC.MQFB_COA;
myMessage.replyToQueueName = "feedback";
myMessage.replyToQueueManagerName =(String)vecQueueInfo.get(3);
myMessage.messageId = null;
myMessage.correlationId = null;
myMessage.groupId = null;
strData = "test";
myMessage.writeString(strData);
myMessage.format = MQC.MQFMT_STRING;
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options = MQC.MQPMO_LOGICAL_ORDER | MQC.MQPMO_SYNCPOINT;
myQueue.put(myMessage, pmo);
qMgr.commit();
myQueue.close();
qMgr.disconnect();
i m getting reason code 2027 exception.
regards,
Ritesh |
|
Back to top |
|
 |
hopsala |
Posted: Thu Dec 08, 2005 11:20 pm Post subject: Re: Acknowledgement method |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
ritesh_pande wrote: |
I m using mqseries using java. My sender channel is at different location and reciever is at different location. |
Wait a sec, can I first ask why you want to do this?
Way I see it, it's quite simple; say you sent a message, and it's persistent - if it's still in the xmitq, it hasn't been sent, if it isn't, it has been sent. This is WMQ we're talking about, assured delivery and all.
So unless you have a buisness requirement to have CODs (as some sites do) I would not recommend investing time doing this. Moreover, by the fact you wrote "urgent" I deduce that this has more to do with some malfunction you're having, and not some robust solution, so we're probably going about this the wrong way.
Please restate the exact scenario - what's the prob, what you want to do and why. |
|
Back to top |
|
 |
hopsala |
Posted: Thu Dec 08, 2005 11:31 pm Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
ritesh_pande wrote: |
i m getting reason code 2027 exception |
That's because you did not specify a ReplyToQ, as is written quite clearly in the manual. Listen, urgent or not, we cannot write your code for you, or read the manual for you; it seems that you do not understand CODs at all, otherwise you wouldn't have forgotten ReplyToQ...
If this is indeed the solution you want, read the manual, search this site (when I searched I found Report Message which is quite exhaustive), and find samples on the internet to help you code; most importantly, accept the fact that all this will take you at least a few days. |
|
Back to top |
|
 |
ritesh_pande |
Posted: Thu Dec 08, 2005 11:33 pm Post subject: |
|
|
Novice
Joined: 05 Dec 2005 Posts: 11
|
hi,
thanks a lot for the reply and investing ur valuable time.
i want to do this because after recieving the confirmation from the reciever channel i m going to update the database.
right now i m manually updating the database after cross checking the data.
regards,
ritesh |
|
Back to top |
|
 |
hopsala |
Posted: Fri Dec 09, 2005 12:17 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
ritesh_pande wrote: |
i want to do this because after recieving the confirmation from the reciever channel i m going to update the database.
right now i m manually updating the database after cross checking the data. |
You mean the database from which you take the data that should be sent? If so, just update it as "sent" after you get an MQRC_NONE from your MQPUT - again, this is WMQ, assured delivery is guaranteed. |
|
Back to top |
|
 |
ritesh_pande |
Posted: Fri Dec 09, 2005 1:03 am Post subject: |
|
|
Novice
Joined: 05 Dec 2005 Posts: 11
|
hi
thanks a lot all of u.
it's over.
regards,
ritesh |
|
Back to top |
|
 |
hopsala |
Posted: Fri Dec 09, 2005 6:18 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
ritesh_pande wrote: |
it's over. |
Wow there! hold your horses!
Could you, for the sake of future generation and the health of mind of those that helped you, fill in the gaps between "I have a prob" and "it's over"? What was the initial problem? How did you solve it?
I'd personally much appreciate it  |
|
Back to top |
|
 |
|