web stats
How does one force errors with multiple queue threads? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2016, 01:01 PM
clinjohn clinjohn is offline
OBX.2 Kenobi
 
Join Date: Apr 2015
Posts: 95
clinjohn is on a distinguished road
Question How does one force errors with multiple queue threads?

Recently we've had a couple of situations where a destination vendor SFTP site was down on a channel that has multiple queue threads. The only way I'm aware to have multiple queue threads (which we need for performance) is to click either "Always" or "On Failure" on message queuing in the Destination Settings. But this has the effect of putting messages in a queue instead of erroring them out. If the vendor's SFTP site is down for an extended time, then we continuously get alerts until the site comes back up. Since we run 24x7, off hours our alerts are texts to our cell phones. It's not fun to get a text message every 30 seconds or so on one's phone in the middle of the night without any way to fix the issue.

On the other hand, if we change message queuing to "Never", we can't create multiple threads. This does cause a message to error out after a set number of retries, and that stops the text messages. But the downside is that all the other messages are backed up behind the one that's stuck, even after the SFTP site comes up, or if the stuck message had any other type of error. That's not acceptable in some of our channels. Plus we lose the performance gain of having multiple threads.

Is there any way to have multiple queue threads but force a queued message to error out after some number of retries or period of time? Would purchasing Support and getting Advanced Alerting make any difference in regards to the above?
Reply With Quote
  #2  
Old 03-07-2016, 02:21 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,117
narupley is on a distinguished road
Default

You can use a response transformer to force a message to error out under whatever criteria you want.

Also yes, with Advanced Alerting you can set wait periods on actions, so that you don't get spammed with e-mails/SMS every time a trigger occurs.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 03-15-2016, 01:46 PM
clinjohn clinjohn is offline
OBX.2 Kenobi
 
Join Date: Apr 2015
Posts: 95
clinjohn is on a distinguished road
Default

I tried out some ideas with Response Transformers, but ultimately determined that may not really be what we need. I misunderstood and therefore misstated the actual problem.

It's not that messages that get queued when a destination is down get errored out. It's that when an site down error at the destination causes a message to get queued, we keep getting alerts on all the successive messages that have the same thing happen to them. We don't need any messages to have their status changed from "QUEUED" to "ERROR". What we need is some method to get alerted that a destination is down, then for the all messages to queue until the destination is back up without sending us additional alerts. One error alert, indefinite number of queued messages. How do we do this?
Reply With Quote
  #4  
Old 03-15-2016, 02:09 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,117
narupley is on a distinguished road
Default

Right, that is something that the Advanced Alerting plugin definitely does. It has a Threshold trigger for alerting when the queued or error count reaches a certain amount for a certain amount of time. It has a Sliding Window trigger for alerting when a status is less then or greater than a certain limit within a certain window length. You can use that to alert when a channel doesn't receive any messages for an hour or more, or to alert when a channel reaches >= 1000 queued messages for an hour or more, etc.

It has multiple escalation levels that you configure, so that you can do different things if it's a "Tier 1" vs. "Tier 2" alert, etc. You can also set a wait period on a specific action, so that it will only e-mail you once when the initial trigger happens, and won't e-mail you again unless the alert returns to normal and then re-triggers anew. Or you can have it e-mail you a maximum of once per hour in that case, up to you.

And a ton more things.... it really is advanced. Anyway that's a commercial extension.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #5  
Old 03-15-2016, 02:47 PM
clinjohn clinjohn is offline
OBX.2 Kenobi
 
Join Date: Apr 2015
Posts: 95
clinjohn is on a distinguished road
Default

Thanks, Nick. Your explanation will help me lobby my management.
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:04 PM.


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