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 » IBM MQ API Support » Confirm on Delivery question

Post new topic  Reply to topic
 Confirm on Delivery question « View previous topic :: View next topic » 
Author Message
Yars13
PostPosted: Mon Oct 11, 2004 8:28 am    Post subject: Confirm on Delivery question Reply with quote

Novice

Joined: 27 Sep 2004
Posts: 21

I'm using C# and i'm trying to test if MQC.MQFB_COD is working or not. I'm doing all of this on the same queue.

I've speficied the message type to be MQC.MQMT_REPORT and Feedback = MQC.MQFB_COD.

What i'm trying to do is put a message on the queue, then right after that get the message and then report back to me that the message has been delivered.

The question is, how do i actually get the message that it has been delivered. I tried printing out the feedback property but all that gives me is an int of 260.

Also, i haven't been able to find this in the .Net manual, but is there a way to specify what you want to get back in the report that the message has been delieved? like the message id or the entire message?

Thanks in advance,

Yars
Back to top
View user's profile Send private message
Yars13
PostPosted: Mon Oct 11, 2004 9:06 am    Post subject: Reply with quote

Novice

Joined: 27 Sep 2004
Posts: 21

one more thing to add. I've set the ReplyToQueueName property to the same queue that i'm posting to.

Thanks
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Oct 11, 2004 9:38 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

I think it is time for you to read the WMQ Application Programmin manual. You are confused on how things work.

So lets define some players:
QMgrName: QM1
Q Name: QUEUE1
Reply Q Name: REPLY1
Sending Program: pgmA
Receiving Program: pgmB

For COA or COD, the application can request 3 different report types: (1) report, (2) report with partial data (100 bytes) and (3) report with full data.

'Report Data' means the original message data.

So, pgmA wishes to have a COD message returned with partial data. Therefore it sets the the MQMD fields as follows:
Code:
sendmsg.replyToQueueName = "REPLY1";
sendmsg.report = MQC.MQRO_COD_WITH_DATA;


Now nothing happens until pgmB retrieves the message. When pgmB GETS the message then the queue manager will then generate the COD message and put it to the message's MQMD Repy-To-Q queue name.

Now in pgmA, you do a regular get but since you will be having both application response messages AND COD messages going to the REPLY1 queue, you need to do some checking:
Code:
if (getmsg.feedback == MQC.MQFB_COD)
{
   System.out.println("COD message and the data returned has a length of " + getmsg.getTotalMessageLength() );
}
else if (getmsg.feedback == MQC.MQFB_NONE)
{
   System.out.println("my regular reply message from pgmB.");
}
else
{
   System.out.println("some other feedback code.");
}


Hope that helps.

You should read up on the differences between COA and COD. Plus how to deal with security setting for COD messages that span more than one queue manager.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Yars13
PostPosted: Mon Oct 11, 2004 12:04 pm    Post subject: Reply with quote

Novice

Joined: 27 Sep 2004
Posts: 21

thanks that does really help.

I got it to work with partial data and full data, but i dont get anything returned if i try to just use MQRO_COD. Is that what you meant by "report"?
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Oct 11, 2004 1:47 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

You probably didn't set it correctly, it should look like:
Code:
sendmsg.replyToQueueName = "REPLY1";
sendmsg.report = MQC.MQRO_COD;

Again, RTM.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Yars13
PostPosted: Tue Oct 12, 2004 4:42 am    Post subject: Reply with quote

Novice

Joined: 27 Sep 2004
Posts: 21

That's exactly what i'm doing. Then to print it out i say Console.WriteLine("Received Confirmation: {0}", sendmsg.ReadString(sendmsg.MessageLength));

This worked for the other two and returns nothing if i just use MQC.MQRO_COD
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Tue Oct 12, 2004 1:46 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Jason, oh Jason, where are you? This smells like a bug.

What do you mean it returns nothing? You mean you never got a message, or you got something but you don't know what it is?

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Yars13
PostPosted: Tue Oct 12, 2004 4:22 pm    Post subject: Reply with quote

Novice

Joined: 27 Sep 2004
Posts: 21

I get an output of "Received Confirmation:" that's it. With MQC.MQRO_COD_WITH_DATA, i get part of my message back, but when i put in just MQC.MQRO_COD, nothing.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Tue Oct 12, 2004 5:30 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Jason, never mind.

Yars13, Tsh, tsh, tsh. You didn't Read The Manual (RTM). We will help you with problems but you MUST ar least read the manual to have an understanding on how things work!!!

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Yars13
PostPosted: Wed Oct 13, 2004 5:37 am    Post subject: Reply with quote

Novice

Joined: 27 Sep 2004
Posts: 21

Roger,

I did read the manual, it does not contain any sample code, which is really what i'm looking for. Your first post was very helpful b/c it showed me what i was doing wrong in my code. I understand the difference between COA and COD. I am however very new to using WMQ and unfortunately do not have the time to do extensive reading and research to understanding everything, right now i just need to get this done and working. If you could help me out with a sample or a link to a sample, i will be very grateful. Thank you

Yars
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Oct 13, 2004 8:45 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

Getting the job done at any cost, is NOT getting the job done.

Every product has their learning curves. The hardiest part of IT is getting through those learning curves!!! If you want to get to the top of the IT heap, then reading, searching, banging head, [repeat], is part of the job. Nobody is going to spoon feed you.

I am learning PHP & MySQL right now. I know nothing about either - well I know SQL. So, I bought a couple of books and read them late at night. And anybody who knows me, knows that I have absolutely no free time but that is part getting things done.

Bottom line, is that IF you had even skimmed the manual, you would have read that MQMD.report set to MQC.MQRO_COD (or MQC.MQRO_COA) does NOT return any data. You get the MQMD and ZERO bytes of data!!!!!!!!!!!!!!!!!!!!!!!!!!!! So, your code is working as expected.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Wed Oct 13, 2004 8:47 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Lets spell this out:

Quote:
the application can request 3 different report types: (1) report, (2) report with partial data (100 bytes) and (3) report with full data.

You have already seen that option (2) gives you partial data. Also, option (3) gives you the full data. So what is left for option (1). Exactly what you are seeing: NO DATA. What else do you expect.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Yars13
PostPosted: Wed Oct 13, 2004 9:08 am    Post subject: Reply with quote

Novice

Joined: 27 Sep 2004
Posts: 21

Roger,

I must have missed the explanation WHEN I WAS looking at the manual, about that part not returning anything back. I appreciate your help and explanation, this is exactly what i was looking for.

However, i do not appreciate the lecture on how to or how to not succeed in IT. I know nothing about your background and you know nothing about mine, or the situation i am currently in.

If there is a beginners forum you can point me to where i can ask for help with clarifications or explanations about WMQ, please let me know.

Once again, thank you for all your help, it is greatly appreciated.

Yars

P.S. if you ever need help with PHP and SQL feel free to ask me.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Oct 13, 2004 9:21 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

Beginner questions are welcome. What people expect is that the 'beginner' makes a reasonable attempt at solving their own problems first (i.e. training, reading, researching, etc..).

Sorry, I touched on a nerve.

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
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 » IBM MQ API Support » Confirm on Delivery question
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.