Author |
Message
|
gayathri |
Posted: Thu Aug 11, 2005 3:29 am Post subject: Persist the message in the queue |
|
|
Apprentice
Joined: 07 Jun 2005 Posts: 36
|
Hi,
I know that MQ messages are read destructive. But is there any option to persist messages in the queue.
I read messages from the queue and will perform some operations in the database. If the operations in the database fails then the message in the queue should not be deleted. I can persist the message read from the queue in the hard disk. But the size of the message read is big and there is a constraint in the storage space in the hard disk. So please let me know how I can persist messages in the queue.
Thanks,
Gayathri |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 11, 2005 3:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please try harder.
We are not here to provide free training.
Go read the documentation for this product, and try things yourself. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
gayathri |
Posted: Thu Aug 11, 2005 4:01 am Post subject: |
|
|
Apprentice
Joined: 07 Jun 2005 Posts: 36
|
Hi,
Sorry if I have asked a trivial question. With hardly few months of working in websphere we are not in a position to fix most issues in less time.
We think this discussion forum is of great help.
Thanks for your time.
Gayathri |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 11, 2005 4:08 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The situation you are in is a very good reason to actually read the manuals. As you move ahead with doing things, you may find yourself remembering little tidbits here and there that you read but did not understand earlier. This will speed up the time it takes you to solve problems.
Your question is not actually trivial. You want to ensure that two things happen or do not happen together - a database update and a queue read. Each of those things is a transaction individually - you can instruct the database that the update failed, and it should be backed out. Likewise, you can instruct the queue that the read has failed and should be backed out.
Both of these transactions can also be put together, using something called variously "Two-phase commit", or "XA", or a few other terms. This allows for both transactions to be done in a single "unit of work" - so that they succeed together or fail together.
The steps to configure and use XA are somewhat complicated, and change quite a lot between different programming and runtime environments. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Thu Aug 11, 2005 5:15 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Quote: |
I know that MQ messages are read destructive. |
Not always. If you don't want them to get destroyed then there is an easy way to stop them being.
As Jeff suggests RTFM. Especially the otpions available to MQGET |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 11, 2005 5:31 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
gayathri wrote: |
Hi,
Sorry if I have asked a trivial question. With hardly few months of working in websphere we are not in a position to fix most issues in less time.
We think this discussion forum is of great help.
Thanks for your time.
Gayathri |
Makes me think you are not only working with WebsphereMQ but also with WAS (Web Application Server)
Make sure you have a good J2EE manual at hand, one that also explains JMS.
Enjoy  |
|
Back to top |
|
 |
gayathri |
Posted: Thu Aug 11, 2005 8:03 pm Post subject: |
|
|
Apprentice
Joined: 07 Jun 2005 Posts: 36
|
Hi All,
Thanks for all your time. I have started reading the manuals.
It is really great to be a member of this forum.
Thanks,
Gayathri. |
|
Back to top |
|
 |
|