web stats
MLLP AR should not retry? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2018, 09:14 AM
jerchap jerchap is offline
OBX.3 Kenobi
 
Join Date: Nov 2007
Location: British Columbia, Canada
Posts: 120
jerchap is an unknown quantity at this point
Default MLLP AR should not retry?

I have 4 test channels:

A - Channel reader, 3 mllp destinations sending to 3 other channels, destination set to queue always and retry 3 times at 10 second interval

B - mllp listener, returns a positive ACK back with an AA code
C - mllp listener, returns a negative ACK back with an AE code
D - mllp listener, returns a negative ACK back with an AR code


If I process a message on channel A, it sends to channel B,C,D.

As expected it successfully sends a message to channel B on first try.
As expected it retries the message to channel C 3 times before erroring out.
As not expected, it retries the message for channel D 3 times. I would have thought it would try 1 time to send to channel D, receive the AR code (application reject) and not try any more times because no matter how many times you retry the application is going to reject the message. Is there any way to configure this behavior?
Reply With Quote
  #2  
Old 05-17-2018, 12:29 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 213
agermano is on a distinguished road
Default

I do not think there is a way to configure that.

I'm also not sure how you have a retry count of 3 with queue always. When I select queue always, my retry count is disabled.
Reply With Quote
  #3  
Old 05-18-2018, 09:28 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 6,986
narupley is on a distinguished road
Default

In practice, in the real world, many servers send back AR codes for temporary errors. Per spec you're right, an AR should mean that the message should not be retried. But the reason why that's not the default behavior here, is to err on the side of caution, to prevent messages from being discarded unbeknownst to the channel developer.

You can override that behavior in the response transformer:

Code:
if (responseStatus != SENT && /[AC]R/.test(msg['MSA']['MSA.1']['MSA.1.1'])) {
	responseStatus = ERROR;
}
Note that if you have the queue set to Never or On Failure and you have more than 0 retries, the destination is going to retry those X amount of retries before the response transformer runs. If you have the queue set to Always, then the retry count is not used.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR

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
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 10:27 PM.


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