Jms 等待对控件ID为的消息的响应超时

Jms 等待对控件ID为的消息的响应超时,jms,hl7-v2,Jms,Hl7 V2,我正在使用HL7协议开发保健类应用程序。在此过程中,我们将使用MLLP向localhost:50005发送HL7消息。这是我用来通过MLLP发送消息的代码 //sending message through mllp PipeParser pipeParser = new PipeParser(); pipeParser.setValidationContext(new NoValidation());

我正在使用HL7协议开发保健类应用程序。在此过程中,我们将使用MLLP向localhost:50005发送HL7消息。这是我用来通过MLLP发送消息的代码

//sending message through mllp
                    PipeParser pipeParser = new PipeParser();
                    pipeParser.setValidationContext(new NoValidation());
                    System.out.println(hl7message);
                    Message message1 = pipeParser.parse(hl7message);
                    ConnectionHub connectionHub =  ConnectionHub.getInstance();
                    Connection conn = null;
                    if (conn == null) {
                        conn = connectionHub.attach(ehrHost, ehrPort, new PipeParser(), MinLowerLayerProtocol.class);
                    }
                    Message response;
                    try {
                        int timeout = 150000;
//                      System.setProperty("ca.uhn.hl7v2.app.initiator.timeout",  Integer.toString(timeout));
                        Initiator init = conn.getInitiator();
                        init.setTimeoutMillis(timeout);
                        response = init.sendAndReceive(message1);
                    } catch (Exception e) {
                        System.out.println("Didn't send out this message!");
                        e.printStackTrace();
        }
这段代码工作正常,并按预期将请求发送到HL7 Soup UI,因为我们已经设置了一个HL7 Soup UI实例,该实例正在端口50005的本地主机上侦听。 我们还将HL7 soup设置为在收到消息后立即发送响应。但在代码中,我们无法得到响应。我们得到以下例外情况:

ca.uhn.hl7v2.HL7Exception: Timeout waiting for response to message with control ID 20171115-000009
 After Exceuter..................................
    at ca.uhn.hl7v2.app.Initiator.sendAndReceive(Initiator.java:152)
    at com.prnreferral.outbound.MLLPOutboundServiceMain$1.run(MLLPOutboundServiceMain.java:173)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
我做了一些研究,发现了一个链接:我添加了超时代码来设置一些超时,这样它就有了一些额外的响应时间,但仍然会得到相同的错误

有没有人对此有所了解,提前谢谢