web stats
Mirth Community - View Single Post - Error messages are not Queued?
View Single Post
  #2  
Old 02-27-2019, 08:52 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,125
narupley is on a distinguished road
Default

The message status can only be in one state. The QUEUED status indicates that the message has encountered a recoverable problem (either because of an unsuccessful dispatch, or for your own reasons in the response transformer) and should be retried. The ERROR status indicates that the message has encountered an irrecoverable problem and should not be retried.

ERROR messages are not retried by design, because that is the difference between the QUEUED and ERROR statuses. When queuing is enabled, messages are typically not set to ERROR. They are set to QUEUED by default.

There are only a few cases where the message status is explicitly set to ERROR. For example if your response is HL7 v2.x, you have Validate Response on, and there's a problem with the HL7 ACK (like a failure ACK code). The Web Service Sender sets the status to ERROR if a SOAP Fault is returned by the server. The TCP Sender sets the status to ERROR if you have "Queue on Response Timeout" turned off and a socket timeout is encountered. The JavaScript Writer sets the status to ERROR if the script cannot be compiled or there is an error executing the script.

So if the status is being set to ERROR, it's likely either because you have queuing turned off, or because you are explicitly setting the status to ERROR in a response transformer.

Note that you can also set the "responseErrorMessage" variable in the response transformer, which will also save error content for the message. That will flag a Processing Error for the message, and in the message browser you will see "Processing" under the Errors column. That error content will also be visible in the content pane below. You can also search on messages with errors with the Advanced search settings. Also, you can enable the Send Attempts column in the message browser, to view how many times a message has been retried.

So even if the message is QUEUED, you can still easily see what error (if any) is associated with the most recent send attempt.
__________________
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