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 » Copy of a message in local queue ..

Post new topic  Reply to topic
 Copy of a message in local queue .. « View previous topic :: View next topic » 
Author Message
Manikrish
PostPosted: Tue Dec 30, 2003 4:02 pm    Post subject: Copy of a message in local queue .. Reply with quote

Apprentice

Joined: 19 Jun 2002
Posts: 35

Hi,

I've got a following scenario. I need to hold the copy of the message in a local queue, even after sending a message to the remote queue. Once on receiving the acknowledgement message from remote q, I should delete the message from the local queue.

How can I keep the copy of a message in a local queue even after sending the message to the remote queue??.

Any help would be appreciated!!!

Thanks
Manikrish
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Dec 30, 2003 5:33 pm    Post subject: Reply with quote

Jedi

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

Sure.

Code:
Connect to MQ
Open Local Queue
Open Remote Queue
Build message buffer
Put to Local Queue using message buffer
Put to Remote Queue using message buffer
Close Local Queue
Close Remote Queue
Disconnect fro MQ


Now, if you need to delete the message in the Local Queue when a reply comes back, you'll have to correlate the MsgId/CorrelationID. There's enough examples of that around.

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
jefflowrey
PostPosted: Wed Dec 31, 2003 8:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You probably need to rethink your design.

It sounds like you're either doing extra work to "improve" the guaranteed once-and-only-once delivery aspects of MQSeries, or doing extra work to improve your ability to correlate a request with a reply.

If you need a full copy of the original request in with the reply, then change your "server" app to do that. Or otherwise change the reply to include those pieces of the request that you need back.

In other words, yes - you can do what you want to (as you've been vaguely shown) BUT it's extra work you probably really don't need.

Of course, you're the only one who knows your real business requirements, so there could be a legitimate reason for doing it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Copy of a message in local queue ..
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.