Author |
Message
|
alexyu |
Posted: Thu Feb 02, 2012 6:00 pm Post subject: Audit Logging for multiple message flows and instances |
|
|
Newbie
Joined: 27 Jul 2011 Posts: 2
|
I have requirement for auditing file processing. the message flows we have as followings:
flow 1: read TDS file and separate it into multiple chunks by about 50 KB, send them to MQ output. (only one instance)
flow 2: read chunks from MQ input and validate every line and then send the valid records to another MQ for further process. (only one instance)
flow 3: read valid records from MQ and then save them into DB (20 instances)
We are requested to logging following audit information like Processing time: [end-start = total]. the "start" is the time start to read the file. and the "end" is the time of latest instance of flow 3 finished saving data to database.
the difficulty for us is to figure out the latest completion time among the instance for last flow.
Any thoughts?
Thanks a lot! |
|
Back to top |
|
 |
lancelotlinc |
Posted: Fri Feb 03, 2012 5:38 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Store start, stop and latency times in LocalEnvironment. Then at the end of your flow, use log4j to write to a log. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Feb 03, 2012 5:54 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Have you considered using the finctionality built into Broker?
Specifically,
FlowMonitoring
? _________________ 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 |
|
 |
Vitor |
Posted: Fri Feb 03, 2012 6:47 am Post subject: Re: Audit Logging for multiple message flows and instances |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
alexyu wrote: |
Any thoughts? |
Use the inbuilt flow monitoring to generate the start & end times. These can then processed asyncronously and reported in any way you fancy (log4j, database, csv file, etc, etc).
Using this you don't need to amend the code if your reporting requirements change in future. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
alexyu |
Posted: Sun Feb 05, 2012 11:25 pm Post subject: |
|
|
Newbie
Joined: 27 Jul 2011 Posts: 2
|
Thank you everyone.
I planed to use flow monitor.
but the file is separated into several blocks, it will be processed in parallel at last flow. I plan to send out control message for further counting, but is there a built-in MB way to collect messages with dynamic size? is it possible for Collector node? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Feb 06, 2012 6:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
alexyu wrote: |
is there a built-in MB way to collect messages with dynamic size? |
alexyu wrote: |
is it possible for Collector node? |
I don't see why you're using control messages _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|