Announcement

Collapse
No announcement yet.

Queuing via destination transformer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Queuing via destination transformer

    We have a WebAPI project written in .net that we use for our message mapping. We are transitioning from another vendor to Mirth.

    In Mirth, we have the destination transformer successfully calling our API and passing off the message, as well as picking up the returned message.

    However, when the API is down, or in an errant state eg return 500 codes, we can not get the connector to queue the message.

    Is there a way for the transformer to tell the connector to re-queue the current message?

    Connector with transformer attached.

    Thank you!
    Attached Files

  • #2
    There is not a simple way to do what you are asking. I have an issue open for this if you'd like to vote for it. http://www.mirthcorp.com/community/i...wse/MIRTH-4255

    I think you basically have two options.

    1. You can use the workaround I mentioned in the ticket. In your case, I would probably use a map variable for the host, and set it to an invalid ip/port any time the connector should queue. You can set the default value in the globalChannelMap, and override it in the connectorMap. You can then check in the response transformer for errors, and if the error was due to you resetting the hostname, you can queue the message.

    2. You can split this into two channels. The first channel has the transformer you attached, but a javascript writer destination. In javascript you can check your condition, and then either queue the message or route it to the downstream channel having the tcp sender. You can return the response from your downstream channel or generate a new one.

    In both cases you'll have to enable regenerate template and include filter/transformer in your advanced queue options.

    Comment

    Working...
    X