web stats
Counting the number of alert messages - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2018, 11:32 AM
alamp alamp is offline
What's HL7?
 
Join Date: Mar 2018
Posts: 4
alamp is on a distinguished road
Exclamation Counting the number of alert messages

Hey Mirth Community,

I have an alert sending to my channel where it then emails me using smtpConn.send() based on how many errors are occuring. For certain error types (ex. destination connection) the alert will give me an infinite loop of alerts ( i'm assuming because i have thousands of queued messages) which in return sends me an infinite amount of emails until the alert plugin is disabled.

My question is is there a way I can keep a count of how many times a certain alert got send to my channel or to count the number of alerts in general. I know there was a method for this in earlier versions but I don't see it anymore.

As of now my channel reads the alert msg in my source transformer by channelMap.put("msg", msg); and then in the destination transformer i get that variable msg and use split() to get the different parts of my alert template.
**my alert template is ${channelName}:${errorType}:${connectorType}
and i am using ":" as my deliminator"**

my end goal is if an email is sent with channelName and ErrorType any time the two variables reoccur simultaneously i would like to stop sending the email or maybe after 10 alerts then send the email as "urgent".

Thanks in advanced guys this will be a huge help for i have searched everywhere with no luck.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Mirth Corporation