ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Continuing the process after throwing the excception

Post new topic  Reply to topic
 Continuing the process after throwing the excception « View previous topic :: View next topic » 
Author Message
Haritha_Flora
PostPosted: Tue Apr 07, 2020 4:38 am    Post subject: Continuing the process after throwing the excception Reply with quote

Novice

Joined: 26 Mar 2019
Posts: 10
Location: Hyderabad,India

Hi,

I hope everybody is doing well.

As per requirement I will receive Batch of events in one message. I need to process each and every event. if the specific event does not satisfy the condition then I have to throw exception and continue the process for remaining events.

If i use THROW statement for throwing user defined exception then my application is handling it (for notifying source application about this particular event') and terminating the message flow without processing the remaining events.

And yes we can notify source application about the event without using error handler (without using THROW) and continue the process without any issue but here i am trying to save some lines of code by using exception handler.

Could you please fill me in if there is any possibility for throwing exception and after continuing the process.

Thanks,
Haritha_Flora.
_________________
Thanks!
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 07, 2020 4:56 am    Post subject: Re: Continuing the process after throwing the excception Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Haritha_Flora wrote:
Could you please fill me in if there is any possibility for throwing exception and after continuing the process.


I'll offer a solution I used, which is a bit clunky but got the job done in what sounds like a similar situation.

My scenario:

A file turns up with 100K records in it from a nightly batch. Conversion from file to a more sensible transport mechanism was impossible because it would have taken 30 years, cost $100t, caused the sky to turn to fire, blah, blah, blah, all the usual excuses for "we've not seen the source code in 20 years and are scared to touch it now Jim's retired".

Not only did processing have to continue in the event of any error, the processing was so I/O bound you couldn't spin through the whole file in the processing window available (the time between the file being finshed and transmitted and the start of the online day) no matter how much horsepower you gave the flow or how it was optimized.

I wrote a flow so Mickey Mouse it had big round black ears that chopped the file into 100K files, each with 1 record in it. I then fed these files to the original flow with a huge number of additional instances set. In this way any one record could fail to process & get reported back as you outline but everything else would go through. I also got a degree of parallel processing, death threats from the DBA team and used a ton of disk & I/O resources on the server which made me really, really popular with the schedulng team.

I offer this as an example; take it for what use you can make of it. If I had my time over (and if this hadn't been dropped in my lap as a crisis that had to be solved absolutely right now if not yesterday), I'd have used WTX to shred the file into it's component records, I'd have done some data analysis and cached the most frequently read database records, staged the database updates and used MQ instead of files to hold the individual records.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Apr 07, 2020 4:28 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

Its not only legacy systems that have designs that can't cope with growth over 10+ years, I continue to see new systems designs that have little regard for performance, efficiency or resource usage. The mantra seems to be "do it in cloud & throw memory / disk / CPU at it until it works". Dev / Test is done using very low volumes. Stress & Volume / QA testing is usually done in the week before Prod deployment, and can reveal some serious deficiencies with overall performance. Todays apps seem to be layer upon layer of abstraction frameworks, complexity and networking paths, using interpretive runtimes like Java that suffer from exorbitant memory usage. (end rant - I've had a bad week with one app's operation)
_________________
Glenn
Back to top
View user's profile Send private message
Haritha_Flora
PostPosted: Wed Apr 08, 2020 3:32 am    Post subject: Reply with quote

Novice

Joined: 26 Mar 2019
Posts: 10
Location: Hyderabad,India

Hi,

Thank you for the suggestions.

Finally I am able to achieve it in Single application.

Thanks,
Haritha_Flora
_________________
Thanks!
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 08, 2020 4:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Haritha_Flora wrote:
Finally I am able to achieve it in Single application.


Care to post it for the benefit of future readers?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Haritha_Flora
PostPosted: Wed Apr 15, 2020 5:12 am    Post subject: Reply with quote

Novice

Joined: 26 Mar 2019
Posts: 10
Location: Hyderabad,India

Care to post it for the benefit of future readers?[/quote]


I have designed the single Interface like below

MQ input-->Compute1----->MQ output

Compute1---->Compute2-->Error Handler (For generating exception email for all kinds of exceptions)

MQinput--->ErrorHandler

--Used PROPAGATE on Compute1

I am receiving batch of records. If the record satisfy the requirement then sending it to the MQ output else changing the flow of Control to Compute2 by using PROPAGATE

On the Compute2 node am generating user defined exception for generating ExceptionList tree and to take the flow of control to Exception handler ( by connecting failure terminal of compute2 to Exception handler). After generating the exception email, I got the flow of control back to compute 1 node for processing the remaining records.

Thanks,
Haritha_Flora
_________________
Thanks!
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Apr 17, 2020 4:12 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Thanks for sharing
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
urufberg
PostPosted: Mon Apr 27, 2020 7:19 am    Post subject: Reply with quote

Apprentice

Joined: 08 Sep 2017
Posts: 28

Vitor wrote:
A file turns up with 100K records in it from a nightly batch. Conversion from file to a more sensible transport mechanism was impossible because it would have taken 30 years, cost $100t, caused the sky to turn to fire, blah, blah, blah, all the usual excuses for "we've not seen the source code in 20 years and are scared to touch it now Jim's retired".


Literally the same nightmare scenario in every customer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Continuing the process after throwing the excception
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.