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 Java / JMS » Triggering a confirmation message from MQ w/ Java

Post new topic  Reply to topic Goto page 1, 2  Next
 Triggering a confirmation message from MQ w/ Java « View previous topic :: View next topic » 
Author Message
volume4
PostPosted: Wed Feb 21, 2007 7:26 am    Post subject: Triggering a confirmation message from MQ w/ Java Reply with quote

Newbie

Joined: 21 Feb 2007
Posts: 9
Location: South Africa

Hi there everyone,

I am using a Java class to get messages from a queue on MQ 5.3. The client wants me to send an acknowledgment via MQ when the app has successfully got the message from the queue.

Now my question is, is there a way that I can use this app to trigger this in MQ? I am not sure if MQ is even able to send such a message...?

Any help or pointers would be much appreciated.

Thanks!
Schalk
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Feb 21, 2007 7:33 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Look up confirmation on delivery messages.

Be sure the client understands what he's asking for. This type of message is seldom necessary, but a lot of people think they are.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
James_O_K
PostPosted: Wed Feb 21, 2007 1:35 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

Yep, as Vitor mentions, people certainly think they are necessary, but because of the assured delivery mechanism and all that stuff, they arent really! I had a similar request a while back, in the end I just sent a reply message to them with a "IVE GOT YOUR MESSAGE" type message in the body.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 21, 2007 1:37 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

James_O_K wrote:
I had a similar request a while back, in the end I just sent a reply message to them with a "IVE GOT YOUR MESSAGE" type message in the body.


And then when you had an error, and rolled back your syncpoint, and then processed the same message again... you sent another reply?


_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
James_O_K
PostPosted: Thu Feb 22, 2007 1:35 am    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

jefflowrey wrote:
James_O_K wrote:
I had a similar request a while back, in the end I just sent a reply message to them with a "IVE GOT YOUR MESSAGE" type message in the body.


And then when you had an error, and rolled back your syncpoint, and then processed the same message again... you sent another reply?



I know what youre saying! But they wouldnt budge as they didnt "trust" the system...
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 22, 2007 1:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

James_O_K wrote:
I know what youre saying! But they wouldnt budge as they didnt "trust" the system...


That's always why they want acknowledgements....

Walk them through a few scenarios along the lines jefflowrey suggests and ask how they want them handled; preferably good, complex, multiple failure and rollback ones. That normally puts this acknowledge nonsense in the bin.

(Or tell them they can sue IBM when the message goes missing - accountants like that )
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Feb 22, 2007 1:52 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

jefflowrey wrote:
James_O_K wrote:
I had a similar request a while back, in the end I just sent a reply message to them with a "IVE GOT YOUR MESSAGE" type message in the body.


And then when you had an error, and rolled back your syncpoint, and then processed the same message again... you sent another reply?



Surely you would put the reply message under the same syncpoint as the request get, and then commit (or rollback) both request and reply together?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Feb 22, 2007 2:11 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

zpat wrote:
Surely you would put the reply message under the same syncpoint as the request get, and then commit (or rollback) both request and reply together?


It is surprisingly easy to get caught in this quasi-recursive message -> acknowledgement -> acknowledgement of acknowledgement -> acknowledgement of acknowledgement of acknowledgement -> etc loop.

After all, if the client doesn't trust that the message arrvies (even using syncpoint and persistence) how can they trust that the acknowledge has been recieved? Unless the original sending application acknowledges that the acknowledgement has been received? Then you can't trust that that acknowledgement has been received and round we go for another cycle...

People should trust more. Especially MQ which is demonstratably trustworthy.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
James_O_K
PostPosted: Thu Feb 22, 2007 2:37 am    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

Vitor wrote:
zpat wrote:
Surely you would put the reply message under the same syncpoint as the request get, and then commit (or rollback) both request and reply together?


It is surprisingly easy to get caught in this quasi-recursive message -> acknowledgement -> acknowledgement of acknowledgement -> acknowledgement of acknowledgement of acknowledgement -> etc loop.

After all, if the client doesn't trust that the message arrvies (even using syncpoint and persistence) how can they trust that the acknowledge has been recieved? Unless the original sending application acknowledges that the acknowledgement has been received? Then you can't trust that that acknowledgement has been received and round we go for another cycle...

People should trust more. Especially MQ which is demonstratably trustworthy.


Yep, had pretty much your conversation with the people mentioned above. Management ofcourse, need i say more?
Back to top
View user's profile Send private message
volume4
PostPosted: Tue Feb 27, 2007 10:54 pm    Post subject: Reply with quote

Newbie

Joined: 21 Feb 2007
Posts: 9
Location: South Africa

Hi everyone,

I have searched on Google and I have read the docs on the IBM public library but have not foun d a way to successfully generate this status message.

Has anyone on here implemented this successfully? If so, would it be possible to post some example code?

Thank you for all of your assistance.
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Feb 28, 2007 12:11 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

volume4 wrote:
Has anyone on here implemented this successfully? If so, would it be possible to post some example code?


A couple of times, under protest, and only to watch the auditors go recursive.

It's not code, it's options and you'll find them described in (for starters) the Application Programming guide.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
volume4
PostPosted: Wed Feb 28, 2007 12:47 am    Post subject: Reply with quote

Newbie

Joined: 21 Feb 2007
Posts: 9
Location: South Africa

So that would be open options set on the queue before getting the message?
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Feb 28, 2007 1:38 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

volume4 wrote:
So that would be open options set on the queue before getting the message?


Not what I was thinking of. Where did you read this? (I could be wrong!)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
volume4
PostPosted: Wed Feb 28, 2007 1:43 am    Post subject: Reply with quote

Newbie

Joined: 21 Feb 2007
Posts: 9
Location: South Africa

No, I did not read it, it was just a thought. I am pretty new to MQ development with Java.

I do have the programming reference so can you give me an indication where I can find this information in that document?

Also, this is done via Java right? It is not something that is configured on MQ itself?

Thank you for all of your assistance. Much appreciated.
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Feb 28, 2007 1:50 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

volume4 wrote:
I do have the programming reference so can you give me an indication where I can find this information in that document?


Report messages are described as part of the MQMD

volume4 wrote:
Also, this is done via Java right? It is not something that is configured on MQ itself?


No, they're generated by the queue manager in response to the relevant options being set.

volume4 wrote:
I am pretty new to MQ development with Java


You probably should spend a little time with the manuals. MQ is not the easiest thing to drive right in on, and as has been discussed in this post report messages are not the best idea. And tricky to get working properly for the reasons expressed.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » Triggering a confirmation message from MQ w/ Java
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.