Author |
Message
|
tonyindl |
Posted: Wed Sep 28, 2011 4:50 pm Post subject: WMB Transaction timeout value. |
|
|
Novice
Joined: 21 Dec 2010 Posts: 13
|
Hi all,
Is there any transaction timeout value which I can configure in the broker to control the transaction time?
I have a simple flow as below:
MQINPUT Node -->java compute nodes --> MQOUTPUT NODE.
Now I have a message which may take 4800 secs to go through the entire flow, so I wonder if there is place to set the transaction timeout value and then I can fail the transaction if it take more that the configurated value.
Thanks. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Sep 28, 2011 5:07 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Did you search google for wmb+timeout? _________________ 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 |
|
 |
tonyindl |
Posted: Wed Sep 28, 2011 5:10 pm Post subject: |
|
|
Novice
Joined: 21 Dec 2010 Posts: 13
|
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Sep 28, 2011 6:17 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
I wasn't suggesting that you only look for mqseries.net hits on google. How about the search results for ibm?
The very first four hits for me were about timeout nodes. Did you look at any of them? _________________ 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 |
|
 |
tonyindl |
Posted: Wed Sep 28, 2011 7:03 pm Post subject: |
|
|
Novice
Joined: 21 Dec 2010 Posts: 13
|
bruce2359 wrote: |
I wasn't suggesting that you only look for mqseries.net hits on google. How about the search results for ibm?
The very first four hits for me were about timeout nodes. Did you look at any of them? |
Hi Bruce,
Yeah, I searched on both websphere developworks and help center.
The timeout nodes are always the top recommended result.
It may have the capability to deal with the transaction timeout,but the design of my flow was done years ago, my bosses don't want to make any change inside the flow.
Just wonder if it is possible to have the transaction timeout value set somewhere outside the message flow but in the broker/execution group.
If it is not possible , how other developers normally do to deal with the message which may take unexpected long time to be processed.How to terminate the transaction within the specified time ,using timeout control node?
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Sep 28, 2011 9:00 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So what does your flow look like? _________________ MQ & Broker admin |
|
Back to top |
|
 |
tonyindl |
Posted: Thu Sep 29, 2011 4:33 am Post subject: |
|
|
Novice
Joined: 21 Dec 2010 Posts: 13
|
fjb_saper wrote: |
So what does your flow look like? |
Hi fjb_saper
it is a simple flow.
MqInput Node --> Java compute node(have the logic to generate outbound message) --> MqOutput node.
That's it.
I'd prefer to configure the transaction timeout value in broker rather than modify the flow.
Please advise.
Thanks.[/img] |
|
Back to top |
|
 |
paintpot |
Posted: Thu Sep 29, 2011 4:49 am Post subject: |
|
|
Centurion
Joined: 19 Sep 2005 Posts: 112 Location: UK
|
Interesting. So you have a single node that may take 1 hour 20 mins to finish doing its task.
I understand that your site doesn't want to reengineer, but this implementation sounds flawed.
Find out what is happening inside the JCN - it is trying to be a batch program? Is it waiting (sleeping) for most of the time?
You should be able to come up with a refactored design that wouldn't have such a strange requirement.
While the site may not want the answer, this will be the right approach. |
|
Back to top |
|
 |
paintpot |
Posted: Thu Sep 29, 2011 4:53 am Post subject: |
|
|
Centurion
Joined: 19 Sep 2005 Posts: 112 Location: UK
|
Other sites don't use WMB for long running transactions. And if they do they tend to action by the message (data/file row by data/file row separately). They may also use aggregation.
Alternatively they use a different technology more suited. |
|
Back to top |
|
 |
tonyindl |
Posted: Thu Sep 29, 2011 5:42 am Post subject: |
|
|
Novice
Joined: 21 Dec 2010 Posts: 13
|
paintpot wrote: |
Interesting. :o So you have a single node that may take 1 hour 20 mins to finish doing its task.
I understand that your site doesn't want to reengineer, but this implementation sounds flawed.
Find out what is happening inside the JCN - it is trying to be a batch program? Is it waiting (sleeping) for most of the time?
You should be able to come up with a refactored design that wouldn't have such a strange requirement.
While the site may not want the answer, this will be the right approach. |
Hi paintpot
Thanks for your reply.
The logic in the JCN is to generate outbound messages based on the number specified in the inbound message.I think for the original requirement , it isn't expected to have a huge number in the inbound message normal less than 100 . However for the special message , it has the number as more than 10k,then we have the problem.
By my understanding if there is no transaction timeout setting out of flow(I am sure we don't have the setting inside the flow) ,the transaction will not stop until the process of the message is done.
However, in fact , it failed after ran for 1 hours and 20 mins.So I guess there may be somewhere to set a value to control the process time.
Or there may be some mechanism to terminate the long run transaction?
I don't find any answer from the help center.
Just try luck here.
Thanks. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 29, 2011 5:47 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You could consider writing the flow like so.
- Read the input message.
- create up to 100 output messages
- update the message to indicate that 100 outputs have been created
- send the updated message back to the input queue
|
|
Back to top |
|
 |
tonyindl |
Posted: Thu Sep 29, 2011 7:04 am Post subject: |
|
|
Novice
Joined: 21 Dec 2010 Posts: 13
|
mqjeff wrote: |
You could consider writing the flow like so.
- Read the input message.
- create up to 100 output messages
- update the message to indicate that 100 outputs have been created
- send the updated message back to the input queue
|
Hi mqjeff
Thanks for your reply.
But is that helpful on control the transaction ?
Could you please give more detail why the flow should be implemented as you mentioned if it can help.
Thanks. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 29, 2011 7:20 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
as laid out, the above flow would open a new transaction for every 100 messages. |
|
Back to top |
|
 |
paintpot |
Posted: Thu Sep 29, 2011 7:59 am Post subject: |
|
|
Centurion
Joined: 19 Sep 2005 Posts: 112 Location: UK
|
So it is trying to be a batch program. What is the affinity between the messages (inside the original message)?
Often, the end useer is happiest if most of the data is processed and the odd one is dealt with my exception if it is an issue. Alternatively, maybe the messages below to different account numbers - you can batch (group) by the account number so that money is processed in order (and a whole group fails at once - which could be the right answer.
People don't normally do uber-transactions, because they will hit a limit at some point and then break ( and here we are! ). This can include databases getting locked etc.
Worst case, compensation may work for you (unwind the transactions of the 99.9% that worked when you hit an error).
look for the smallest grouping that has business meaning and send the messages based on that.
Your JCN code may be suspect if it takes a long time to split up one big message - I would look at the samples in the toolkit that use ESQL. The JCN code may have been written in an inefficient manner |
|
Back to top |
|
 |
tonyindl |
Posted: Thu Sep 29, 2011 8:39 am Post subject: |
|
|
Novice
Joined: 21 Dec 2010 Posts: 13
|
mqjeff wrote: |
as laid out, the above flow would open a new transaction for every 100 messages. |
hi mqjeff
Thanks , I got it . That is a way to reduce the transaction time for my issue by redesigning the flow. |
|
Back to top |
|
 |
|