Announcement

Collapse
No announcement yet.

deferred acknowledgment

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

  • deferred acknowledgment

    Hi,

    I would like to know if a channel can manage the "deferred acknowledgment".
    For example:
    For each Hl7 message received on inbound channel, mirth has to send back, on the same socket, a character (06), so the ancillary knows that mirth has securely stored the last message.

    I know it's a strange request.

    Do you think a right solution could be change something on mule ??

    Please let me know

  • #2
    Re:deferred acknowledgment

    This can be done using a TCP reader, in a synchronous channel.

    Of course, you can modify the LLP reader to achieve this. In this case you need to modify the mirth code (not mule code).

    Comment


    • #3
      Re:deferred acknowledgment

      Mirth 1.6 allows you to access the incoming socket directly on both TCP and LLP.
      Chris Lang

      Comment


      • #4
        Re:deferred acknowledgment

        Dear All,

        thank you for your quick and detail answer to my question.
        When do you plan to release the 1.6 ?

        I tried to define a simple TCP Listener, but my ancillary system waits the following deferred ACK

        0B 06 1C 0D

        and i think the TCP listenr sends just the 06

        Please, other proposal?

        Thank you so much

        Comment


        • #5
          Re:deferred acknowledgment

          Dear All,

          Can you explain better how to access sockets from transformer?

          it could be the solution to my issue related to the deferred ack

          Thank you

          Comment


          • #6
            Re:deferred acknowledgment

            You have an object called "receiverSocket"

            This is a standard Java socket - please see http://java.sun.com/j2se/1.5.0/docs/...et/Socket.html for information on using it.

            You can use any Java class from your transformer by using "Packages.<name of class>"

            For example, to use an input stream:

            Code:
            var is = new Packages.java.io.InputStream;
            You can also access the objects directly from the socket:

            Code:
            receiverSocket.getOutputStream().write(0);
            receiverSocket.getOutputStream().write(6);
            receiverSocket.getOutputStream().flush();
            http://java.sun.com/j2se/1.5.0/docs/...putStream.html
            Chris Lang

            Comment


            • #7
              Re:deferred acknowledgment

              How to use "receiverSocket"?

              I got the following error message when uisng "receiverSocket"

              ERROR-300: Transformer error
              ERROR MESSAGE: Error evaluating transformer
              com.webreach.mirth.server.MirthJavascriptTransform erException:
              CHANNEL: Lancaster
              CONNECTOR: sourceConnector
              SCRIPT SOURCE:
              LINE NUMBER: 2
              DETAILS: ReferenceError: "receiverSocket" is not defined.
              at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateScript(JavaScriptTransform er.java:379)
              at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:289)
              at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
              at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
              at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
              at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:200)
              at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
              at org.mule.routing.inbound.SelectiveConsumer.isMatch (SelectiveConsumer.java:61)
              at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:79)
              at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:493)
              at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)
              at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:244)
              at com.webreach.mirth.connectors.tcp.TcpMessageReceiv er$TcpWorker.processData(TcpMessageReceiver.java:2 99)
              at com.webreach.mirth.connectors.tcp.TcpMessageReceiv er$TcpWorker.run(TcpMessageReceiver.java:263)
              at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
              at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
              at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
              at java.lang.Thread.run(Unknown Source)

              Comment

              Working...
              X