web stats
Queuing via destination transformer - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2018, 09:50 AM
arronramsey arronramsey is offline
Mirth Newb
 
Join Date: Sep 2007
Posts: 13
arronramsey
Default 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
File Type: xml SampleConnector.xml (13.8 KB, 5 views)
Reply With Quote
  #2  
Old 08-21-2018, 01:03 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 955
agermano is on a distinguished road
Default

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.
Reply With Quote
Reply

Tags
transformer, webapi

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 07:13 AM.


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