Author |
Message
|
ste |
Posted: Wed Jun 09, 2004 6:51 am Post subject: Creation of an unique messageID before sending a message |
|
|
Newbie
Joined: 27 May 2004 Posts: 5
|
Hi
I know that it is possible to ask the QueueManager to create a new unique ID for the message I'm sending, specifying the MQPMO_NEW_MSG_ID flag in the put option.
I would like to ask if there is a way to for a new unique ID before sending any message.
Thanks in advance,
Steve |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 09, 2004 6:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What have you tried? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ste |
Posted: Wed Jun 09, 2004 7:05 am Post subject: |
|
|
Newbie
Joined: 27 May 2004 Posts: 5
|
I my scenario I have a database of messages which shall be sent to a queue.
I have a component which interface my system to MQSeries queues.
I would like to associate my messages with unique IDs before passing them to this component which shall send them. This component shall copy thess IDs in the messages.
If something goes wrong and the component crashes after having sent a message but before having replied to me, I would think that the message wasn't delivered.
Using this ID I can check if a message already exists in the queue before sending it again. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 09, 2004 7:19 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
ste wrote: |
If something goes wrong and the component crashes after having sent a message but before having replied to me, I would think that the message wasn't delivered. |
Why would you think that? Because the component doesn't give you an unambiguous response in this respect?
ste wrote: |
Using this ID I can check if a message already exists in the queue before sending it again. |
How? By browsing the queue for a particular message id? What if the message has been put by the component, and then gotten by the receiving application already? What if the queue is a remote queue?
You should read the Application Programming Guide, particularly some of the sections on transactions.
You appear to be trying to solve a problem in a poor way that is already solved for you with two-phase commit or even plain MQSeries transactions.
And, this is the wrong forum for this question.
And, again, What Have You Tried? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ste |
Posted: Wed Jun 09, 2004 10:48 pm Post subject: |
|
|
Newbie
Joined: 27 May 2004 Posts: 5
|
Ok,
Thank you for your advise.
You're perfectly right... It doesn't make sense.
Steve
p.s.
Actually I haven't tried anything at the moment.
p.p.s.
Which is the correct forum for question like this? |
|
Back to top |
|
 |
Michael Dag |
Posted: Wed Jun 09, 2004 10:58 pm Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
|
Back to top |
|
 |
|