Author |
Message
|
ammar |
Posted: Mon Nov 10, 2008 10:50 pm Post subject: Need to confirm that msg is copied to second qeue |
|
|
Novice
Joined: 10 Nov 2008 Posts: 12
|
i have two mqqeues qeue1 n qeue2
i have written a program in java that put my msg in qeue1 n then this msg is copied to qeue2 by
Mqqeue manager
if second qeue is full then msg disappears n exception added
on qeue2
Is there anyway so that i can confirm in my program that msg is not successfully added to qeue2 |
|
Back to top |
|
 |
xhaxk |
Posted: Mon Nov 10, 2008 11:20 pm Post subject: |
|
|
Apprentice
Joined: 30 Oct 2008 Posts: 31
|
put to a distribution list
check the individual response records for each destination |
|
Back to top |
|
 |
zpat |
Posted: Tue Nov 11, 2008 1:43 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
This sounds very confused.
Assuming you mean a remote queue as the 2nd queue, then you cannot determine if the final destination queue is full when putting the message.
De-coupling means that your application should not have awareness of this. MQ will not lose the message, it will be sent to the DLQ.
Operational procedures should be in place to monitor the DLQ and take actions necessary. Also monitoring queue depth may be advisable but these are not application issues.
Don't design applications to have awareness of the MQ infrastructure. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 11, 2008 2:06 am Post subject: Re: Need to confirm that msg is copied to second qeue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ammar wrote: |
this msg is copied to qeue2 by
Mqqeue manager |
Only if the 2nd queue is hosted by a different queue manager or you've written an exit (which isn't really part of the queue manager).
ammar wrote: |
if second qeue is full then msg disappears n exception added on qeue2 |
Exception added where? On a message? On the queue that is apparently full but has room for an exception? What exception? What error code? If you've set the message to be non-persistent it could well disappear. If not, it could just be somewhere you don't expect.
ammar wrote: |
Is there anyway so that i can confirm in my program that msg is not successfully added to qeue2 |
If you've bought MQ software then presumably you don't want your program to know what's happening with the message; it's the point of WMQ. Also in a well-configured WMQ layout messages won't go missing or be undelivered without the administrator knowing. But again, the administrator will find out not your program. Your program shouldn't care. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ammar |
Posted: Tue Nov 11, 2008 5:04 am Post subject: Re: Need to confirm that msg is copied to second qeue |
|
|
Novice
Joined: 10 Nov 2008 Posts: 12
|
Vitor wrote: |
ammar wrote: |
this msg is copied to qeue2 by
Mqqeue manager |
Only if the 2nd queue is hosted by a different queue manager or you've written an exit (which isn't really part of the queue manager).
ammar wrote: |
if second qeue is full then msg disappears n exception added on qeue2 |
Exception added where? On a message? On the queue that is apparently full but has room for an exception? What exception? What error code? If you've set the message to be non-persistent it could well disappear. If not, it could just be somewhere you don't expect.
ammar wrote: |
Is there anyway so that i can confirm in my program that msg is not successfully added to qeue2 |
If you've bought MQ software then presumably you don't want your program to know what's happening with the message; it's the point of WMQ. Also in a well-configured WMQ layout messages won't go missing or be undelivered without the administrator knowing. But again, the administrator will find out not your program. Your program shouldn't care. |
Sorry i have writen a little worng exception trace is not added on qeue2.
qeue2 does not recive anything and message disappears
is there some way so that i can check qeue2 length n not add my msg to qeue1 |
|
Back to top |
|
 |
zpat |
Posted: Tue Nov 11, 2008 5:34 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I get the impression that no-one is listening to the good advice given.
Define a DLQ and MQ WILL NOT LOSE THE MESSAGE.
Make the received queue maxdepth adequate - what is the problem here? |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Nov 11, 2008 7:30 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
then this msg is copied to qeue2 by Mqqeue manager |
Exactly how is the message copied by the queue manager from queue1 to queu2? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 11, 2008 8:05 am Post subject: Re: Need to confirm that msg is copied to second qeue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ammar wrote: |
qeue2 does not recive anything and message disappears |
WMQ makes messages disappear only if you allow it. When you say "disappears" what you mean is "not on queue2 where I expect it". Have you checked the dead letter queue, transmission queue, failure queue (if defined) and made the usual checks.
ammar wrote: |
is there some way so that i can check qeue2 length
|
I'm not going to dignify that with an answer. Check the documentation.
ammar wrote: |
n not add my msg to qeue1 |
Yes - don't put it from your Java program. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|