Author |
Message
|
siddique20 |
Posted: Tue Dec 02, 2014 10:43 pm Post subject: How to catch IBM Integration Bus events |
|
|
Novice
Joined: 03 Jul 2014 Posts: 13
|
Hello,
I'm using message broker 9.
My Query: I need to catch the Integration Nodes, Execution Groups and Applications or Services Stop events at application level (in ESQL). How can we catch these events in compute nodes (ESQL)? or Can we access these via properties in compute nodes?
Explanation:
Let me explain in detail….. we have some batch applications/jobs developed in Message Broker 9.
**Application have some message flows and each flow start and controlled with the Timer Node.
**We have configured Timer Nodes to the delay of 60 seconds.
**In Each cycle we fetch some records from Database, process each record one by one, do some processing on that data and write those records to output queue.
**We have used compute nodes + ESQL to accomplish these tasks.
**Sometime a single cycle takes too long time e.g. 2 Hours to complete when it fetch lot of records from database.
**When we try stop the application or execution group, it waits for all current cycles to complete and then it stopped. Means some time we have to wait 2 Hours for the execution group or Application to stop.
Now is there any mechanism thru which we can check/catch the ‘Stop events’ request in each cycle e.g. in compute nodes (ESQL)? So that we can stop processing further records and safely terminate our applications/programs.
Any help in this regard will be highly appreciated. |
|
Back to top |
|
 |
Simbu |
Posted: Wed Dec 03, 2014 12:49 am Post subject: |
|
|
 Master
Joined: 17 Jun 2011 Posts: 289 Location: Tamil Nadu, India
|
Looks like you will have to revisit the flow design again to handle the huge records fetched from database and allow the broker to process these records by adjusting the interval of seconds.
Coming to your question of detecting the message flow stop requesting, there is a new function introduced in IB v9 to check if a request has been made to stop a message flow
INSTANCESTOPPING function |
|
Back to top |
|
 |
siddique20 |
Posted: Wed Dec 03, 2014 2:01 am Post subject: |
|
|
Novice
Joined: 03 Jul 2014 Posts: 13
|
Thanks Simbu... You solved my problem. INSTANCESTOPPING is basically what i was looking for. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Dec 03, 2014 2:38 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
It is not as simple as adding that call into your flow.
What about the transactionality of the work that has been done?
What about keeping track of what has been done so that you don't re-do it all over again?
I'd really think about breaking up your job into smaller parts so that things can run in parallel and not take so long. If as you say, your flow takes 2 hours to extract data from the DB then there mught well be something wrong with your design. How much data (records etc) are you talking about?
could you not do a bulk extract to a file and then write all that to a queue?
I'm just saying that there may well be better solutions to your problem than the one you have come up with. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
siddique20 |
Posted: Wed Dec 03, 2014 4:32 am Post subject: |
|
|
Novice
Joined: 03 Jul 2014 Posts: 13
|
The application/job behavior is something like given below.....
.. Recs[] = Fetch All pending records from Database
.. While (Recs i is not last)
{
.. Create SMS A alert for Recs[i].
.. Write SMS alert to output queue.
.. Recs[i].SMS_SEND_STATUS = true.
}
======= With INSTANCESTOPPING function ===========
.. Recs[] = Fetch All pending records from Database
.. While (Recs i is not last) AND (INSTANCESTOPPING() <> 'TRUE')
{
.. Create SMS A alert for Recs[i].
.. Write SMS alert to output queue.
.. Recs[i].SMS_SEND_STATUS = true.
} |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Dec 03, 2014 8:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I see your problem. Ditch working with indexes and replace with references.
You will be an order of magnitude faster.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|