Author |
Message
|
paustin_ours |
Posted: Tue Jun 07, 2016 4:30 pm Post subject: MQ commit message |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
I am testing commit count and commit interval on a BAR file. I set the commit count to 3. I am accumulating message entries in the env variable and on the third message insert in the database. Trying to see how to check for the commit message?
the only thing i see different between first two messages and the third message is that the message type is 8 on the third message.
is there any other way to check for the commit message?
is checking for message type 8 a safe way to check for the commit message and do the database commit? |
|
Back to top |
|
 |
paustin_ours |
Posted: Tue Jun 07, 2016 5:00 pm Post subject: |
|
|
Yatiri
Joined: 19 May 2004 Posts: 667 Location: columbus,oh
|
i learnt that i cant even store the message values in environment. i get a new environment each message. Is there a way to do this?
accumulate message components for three messages and only insert on the third message and commit. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Jun 07, 2016 8:01 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Insert on each message. The commit will happen on the 3rd one. Before that your entries are uncommitted... That is if you set all your commits right on the nodes.
What you were looking for is a collection node. Define your collection and insert it into the DB with one call...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 08, 2016 4:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Yes, the Environment tree does not last outside of an message flow thread.
This is part of the reason that IBM introduced the Global Cache. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
maurito |
Posted: Thu Jun 09, 2016 3:46 am Post subject: |
|
|
Partisan
Joined: 17 Apr 2014 Posts: 358
|
If you are using ESQL, use a SHARED variable that will survive across messages. You will need to initialize on first messages and then increment and/or reset when needed.
Then you can throw an exception. When the count is 1 or 2 the queue should be backed out and you will see nothing. when the count gets past 3, you should see 3 messages in the queue.
That will prove that all your settings are right. Then replace the writing to queue with an insert to the database |
|
Back to top |
|
 |
|