Author |
Message
|
pepgrifell |
Posted: Tue Oct 26, 2004 2:40 am Post subject: persist MQSeries messages to Oracle |
|
|
Novice
Joined: 13 Nov 2003 Posts: 14
|
Hi,
I have a local MQ queue that receives messages from a remote MQ queue. A MDB is listening the local MQ queue. I would like to know if messages that arrive to local queue can be persited to Oracle.
I have listened something about oracle advance queues. Could the local MQ queue send the message to the oracle advanced queue and then connect the MDB to an oracle advanced queue ?
If I stop the database, what will happen with the messages ? they will be sent back to the remote MQ queue ?
Thanks !!! |
|
Back to top |
|
 |
zpat |
Posted: Tue Oct 26, 2004 5:52 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I don't know what MDB is.
But to ensure no data loss simply arrange for global (XA) transaction coordination between MQ and Oracle. Get your persistent messages under syncpoint, update the database and then commit the unit of work. |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Oct 26, 2004 6:57 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I don't know what an "Oracle advanced queue" is. WMQ messages are persisted in the file system. You could certainly get a message in an MDB and then do something to write it to an Oracle advanced queue. I can't comment on the connecting of the MDB to an Oracle advanced queue. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Oct 26, 2004 2:50 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi pepgrifell,
It sounds like you are describing the JMS Bridge in WebLogic.
One of the applications (before my time) implemented this 'feature' and we have had NOTHING but trouble.
For those who don't know what the JMS Bridge is: It reads messages into memory from a mq queue, and writes them to an Oracle persistent store (database).
Really, it is just double-queuing or actually just message hopping from one queue to the next.
The problems starts with:
(1) 60,000 messages arrive on the MQ queue and the JMS Bridge reads ALL of them into memory while slowly 'Inserting' them into Oracle. Hence, the JVM blows-up on 'out of memory'. The JMS Bridge does NOT have a flow control!!!!
(2) Someone will phone and say they are missing messages. I look at current depth of the queue and it is zero. I now have to phone the DBA to have them look at the persistent store and tell me how many messages are available. But the problem is that if the JMS Bridge is behind 'Inserting' messages into the persistent store, you cannot tell how many messages are in memory!!!!! Ahh..
From personal experience, I would NEVER use the JMS Bridge in any web application. Just use JNDI and use WMQ Server as your message repository.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
pepgrifell |
Posted: Tue Oct 26, 2004 11:56 pm Post subject: |
|
|
Novice
Joined: 13 Nov 2003 Posts: 14
|
MQ persitent messages are stored in files where MQSeries is installed. Do you know if instead of saving the messages in files it´s possible to save them in db (oracle) ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 27, 2004 4:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
pepgrifell wrote: |
MQ persitent messages are stored in files where MQSeries is installed. Do you know if instead of saving the messages in files it´s possible to save them in db (oracle) ? |
NO. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 27, 2004 2:11 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Guy's
What pepgrifell is describing is the Oracle Messenging Gateway. This is a JMS MQ to AQ and AQ to MQ tool. You don't use an MDB but setup the AQ side and the MQ side. Than you create in oracle the procedures and links from MQ to AQ and vice versa.
Oracle Messenging Gateway takes care of passing the messages from one provider to the other. The way to do that is pretty well documented in the Oracle Messenging Gateway documentation.
The application programmer only needs to know his side of the fence (either MQ or ORACLE AQ). By the way I believe you can use Oracle AQ as a JMS provider in your J2EE app.
We use the Oracle Messenging Gateway in our production environment to connect to an oracle native app (via AQ) and have been quite happy so far with it.
Enjoy  |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 28, 2004 5:08 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
pepgrifell wrote: |
Do you know if instead of saving the messages in files it´s possible to save them in db (oracle) ? |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Oct 28, 2004 4:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Pepgriffel wrote: |
I have listened something about oracle advance queues. Could the local MQ queue send the message to the oracle advanced queue and then connect the MDB to an oracle advanced queue ? |
See my post above about the Oracle Messenging Gateway...
Pepgriffel wrote: |
If I stop the database, what will happen with the messages ? they will be sent back to the remote MQ queue ? |
Stopping the DB will stop the Messaging Gateway. The messages will not flow between AQ and MQ and will wait each on their side until the gateway is up again...
Enjoy  |
|
Back to top |
|
 |
|