Paul D.
Paul D.

Reputation: 181

Error notification on mule flows

I am relatively new to mule and Im wondering if there is a built in error notification if there an error on a mule flow or if this can be set up in the mmc to trigger an alert if something is wrong with the flow. Please advise.

Thanks and Have a good day!

Upvotes: 1

Views: 640

Answers (1)

Mauro Rocco
Mauro Rocco

Reputation: 5128

You can do it in several ways.

  1. The MMC can do log analysis send an email if matches a certain pattern.
  2. You can simply had an exception handling in the flow like a Catch Exception and do the send of a mail there, I wrote a blog post having has sample this case
  3. You can use mule notification system to create a java class that will manage this notification, maybe using log4j SMTP appender to easily send notification mails.

This are my opinion about the 3 methods

  1. First method relies on the mmc being up, mmc creates load on your mule server anyway by making calls and in some production environnement it may be disabled depending on the internal policy of the company. Furthermore if for some reasons goes down you will not receive any notification so you also need to make sure your mmc stays high available. Not an option for me.
  2. I find this method the most appropriate as is it similar to standard exception handling in programming. Manage your exception when you need to and never let them pass silently. When needed send some via mail.
  3. This approach is not bad but not my favorite because lot of times you will see "fake exception" coming in that you need to filter. One example is when a client stops the connection to mule (closing the browser for example) you will get a socket exception that mule cannot write back, this is totally normal and I don't think you want to be spammed by this kind of mail. If you really want to use this system than keep in mind you will need to filter non critical exceptions.

Hope this helps

Upvotes: 3

Related Questions