web stats
How to send message on tcp listener - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2018, 12:49 AM
Developer100 Developer100 is offline
What's HL7?
 
Join Date: Sep 2018
Posts: 1
Developer100 is on a distinguished road
Default How to send message on tcp listener

Hi All,

I would like to know if it is possible to send messages on a channel with a source of type tcp listener in client mode that maintains an open connection.

I explain in detail the problem I have. I am working with a patient monitor that uses the hl7 2.3 protocol. To send data, the monitor acts as a server and needs a client to connect to it via the tcp protocol and keep the connection open. On this communication channel the monitor constantly sends data on a regular basis. This monitor also accepts QRY messages but these messages must be sent on the already open connection. I need to know if it is possible via mirth to send these messages on the open connection.

I have attached the configurations I'm using. These configurations work perfectly as far as opening the connection and receiving data but I have no idea how to send a message on this connection.

Thanks for your help.
Attached Images
File Type: png tcpListener.PNG (27.0 KB, 5 views)
Reply With Quote
  #2  
Old 09-11-2018, 08:21 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 435
agermano is on a distinguished road
Default

Does the monitor only accept a single incoming connection? If not you could open a second connection in another channel with a TCP Sender to send your QRY messages.

The TCP Listener can only respond to incoming messages.

It would be quite a hack, but I suppose if there are no other options, perhaps you could queue up your QRY messages in the globalChannelMap, and then the next time you receive a message, tack them on to the end of the response.

Your channel would then need to handle the normal incoming messages, the QRY messages you want to queue, and the responses to the QRY message.
Reply With Quote
Reply

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 12:14 AM.


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