Announcement

Collapse
No announcement yet.

How to avoid executing some code when messages are queued

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

  • How to avoid executing some code when messages are queued

    We have 3 channels currently configured for one customer .
    Channel 1 does basic validations of the input HL7 message .
    Channel 2 does HL7 to FHIR transformation.
    Channel 3 sends the message to the endPoint.

    The message hops from Channel 1 --> Channel 2 --> Channel3 . The hop from Channel 2 to Channel 3 is only because we use custom code to send the message to endPoint instead of using the different sender configuratons on the destination. This is especially important because if we have to stop the FHIR messages to be send to endpoint due to some transformation issue we can just stop the destination at Channel 2 . Now since the sending to endpoint part is in another channel , the messages are queued at channel 2 .
    If I move my custom code from Channel 3 to Channel 2 as the last step of transformation on destination side , stopping channel 2 would not stop sending the message to the endpoint since even though the message is queued , all the transformation steps are executed and hence the message is still send to the endPoint .

    Is there any other workaround (other than creating an extra channel) to stop sending message to endPoint when stopping Channel 2.

    Thanks.

  • #2
    I guess I don't understand this statement "The hop from Channel 2 to Channel 3 is only because we use custom code to send the message to endPoint instead of using the different sender configuratons on the destination."

    It seems like in this flow, I would have one channel. The HL7 validation would happen on the source, the transformation and delivery would happen on the destination. Why are multiple channels needed?
    Best,

    Kirby

    Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

    Appliance Version 3.11.4
    Mirth Connect Version 3.8.0
    Java Version 1.6.0_45-b06
    Java (64 bit) Version 1.6.0_45-b06
    Java 7 (64 bit) Version 1.7.0_151-b15
    Java 8 (64 bit) Version 1.8.0_181-b13
    PostgreSQL Version 9.6.8

    Comment


    • #3
      I think what you want is in the destination's advanced queue settings. Enable the Regenerate Template and Include Filter/Transformer settings. It will reprocess the transformation steps before sending to the end point.

      Comment


      • #4
        Yes but during the first time when it executes the transformation steps , since sending to the endpoint is one of the last transformation step it will still send those messages to the endpoint. Reprocess will ensure that nextime when I send the messages from the Queue it will reprocess through filter/transformations before sending the message but it still cannot stop the sending of the messages to the endpoint during the first time when the problem was detected and the destination stopped .

        Comment


        • #5
          You may need to upload some example channels, because it isn't clear what you mean or how your channels are configured. I thought you said you stopped channel 2, so how could it continue sending to the endpoint if that code is in a stopped channel? When you start back up, any messages queued for channel 2 will reprocess with the new code, and any new message sent from channel 1 will process with the new code. Anything else would have had to have happened before you stopped channel 2.

          Comment


          • #6
            Hi .. we got around that problem by moving the last transformation step ( which was sending the message to the endPoint) to javascript code written in the Destination configured as Javascript writer . That way during queueing even if it runs the transformation steps, the messages are not send to the destination . Thanks..

            Comment

            Working...
            X