|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Copy of a message in local queue .. |
« View previous topic :: View next topic » |
Author |
Message
|
Manikrish |
Posted: Tue Dec 30, 2003 4:02 pm Post subject: Copy of a message in local queue .. |
|
|
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 |
|
 |
EddieA |
Posted: Tue Dec 30, 2003 5:33 pm Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Wed Dec 31, 2003 8:02 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|