|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WBIMB questions |
« View previous topic :: View next topic » |
Author |
Message
|
vignesh.gopal |
Posted: Fri Nov 17, 2006 4:18 am Post subject: WBIMB questions |
|
|
Novice
Joined: 23 Dec 2002 Posts: 24
|
Hi Guys,
I have a couple of questions regarding WBIMB
1)When a message arrives into a message flow and if there is any problem with the application database or the broker database ,the flow generates an error and message is backedout.For all the messages which follow the result is the same.
Is there any means by which i can stop the message flow as soon as the error occurs for the first time?
2)I understand that every message flow pools a queue and gets the message once it arrives onto it.But i would like this message flow to start executing at a specifc time(lets say at 2pm everyday) without bothering on the number of messages.
Secondly,what if i want the message flow to start for every 10 messages arriving on the queue?
is this feasible,if yes what could be the possible ways to accomplish?
3)How do i cache message body within the scope of an execution group.
If i have environment variables then they are lost after the execution of the flow.There are different ways
a)i can use a database.
b)custom node like cache node.
Instead of using the above 2 ways,can i accomplish this using just wbimb facilities.
Please provide your inputs on the same
regards
Vignesh |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 17, 2006 4:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Hi,
1) If you trapped the error & handled it via the failure terminal you could trigger a process that stopped the flow. Presumably you'd need logic someplace to determine if it's one bad message or a more general issue; I doubt you'd want the flow to stop for trivial or one-off problems.
2) If you're using v6 you can use timer nodes to schedule flows. I don't see why you'd want to want to wait for 10 messages to turn up; what happens if 9 turn up and the 10th turns up 3 days later? Do you really want 9 messages unprocessed for an indeterminate period.
If what you mean is you have 10 releated messages, you should look into MQ's grouping options.
3) It's not straightforward and there's been a lot of discussion of it here in the forum. Do a search and see if some of the proposed solutions would fit your needs. Using a database is a popular option, the search will highlights pros and cons. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 17, 2006 4:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
3) is easy to do in Java.
The JVM is per execution group, so any Java object that uses the Singleton pattern will persist across the entire execution group.
You can do this in a JavaCompute node in v6.
You can only access the data from Java, though. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 17, 2006 5:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Regardless, generally Message Broker flows are built to be as stateless as posssible.
A message flow that needs to only be triggered every tenth message almost certainly means that the 10 messages have some kind of affinity for each other, and message affinity is a pattern to avoid in distributed queuing.
If you really need to do it, though, you can use a combination of the MQInput node and the MQGet node in a flow. Use the MQGet node to read the other 9 messages (you have to code the loop yourself).
This is, for example, one way to process a logical group in a single flow execution. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|