Migrate a Mirth JMS or Web Service Listener channel
Import a Mirth channel that reads a JMS queue or answers SOAP requests, set the broker or sender credentials it can't carry, and cut the senders over.
Many Mirth interfaces don't start from MLLP. A lab system may drop results on a JMS queue, or a partner may call a SOAP service that Mirth's Web Service Listener serves. This recipe imports such a channel, fills in what the import can't carry (the broker password and the SOAP login), and moves the senders over.
Source and destination
The JMS channel reads a queue on the broker the Mirth channel used. The SOAP channel gets a new address on the engine that serves the same acceptMessage operation, so the sender's generated client keeps working.
flowchart LR
A[Lab system] -->|JMS message| B[ActiveMQ queue lab.results]
B -->|AMQP 1.0| C[JMS trigger]
D[Partner client] -->|SOAP acceptMessage| E[SOAP trigger]
C --> F[Workflow steps]
E --> F
F -->|send| G[JMS queue orders.out]- Source: a Mirth channel export (
.xml) whose source is a JMS Listener or a Web Service Listener, or that has a JMS Sender destination. - Destination: whatever the channel's other destinations were. A JMS Sender becomes a
jmssend step. - Result: a draft workflow with a
jmsorsoaptrigger and ajmsprofile stub to complete.
What it uses
- The Mirth import.
- The JMS trigger and the JMS adapter (
send), over AMQP 1.0. - The SOAP trigger at
/api/triggers/soap/{listenerId}, with its WSDL at?wsdl.
1. Import the channel. The import reads the broker's host and port from the connection factory's broker URL, keeps the user name and the client id, and never imports the password. A JMS Listener on tcp://mq.example.test:61616 (ActiveMQ's OpenWire port) becomes this trigger and profile stub, with a finding to check the broker's AMQP port:
{
"type": "jms",
"adapterProfileId": "pending:Demo Health queue-source",
"destination": "lab.results",
"destinationType": "queue"
}{
"brokerType": "activemq",
"host": "mq.example.test",
"port": 5672,
"username": "medhook-reader",
"timeout": 30000
}A Web Service Listener becomes a soap trigger keyed by the channel id, with Mirth's service name and SOAP binding:
{
"type": "soap",
"listenerId": "mirth-7a1d0e2f-3333-4b3c-8d4e-000000000202",
"serviceName": "LabIntake",
"soapVersion": "1.1"
}2. Complete what the import can't carry.
- On the
jmsprofile, enter the broker password. Turn ontlsEnabledwith the broker's CA for PHI: plain AMQP is accepted with a warning. Enable the broker's AMQP connector if Mirth used OpenWire (ActiveMQ Classic:amqp://0.0.0.0:5672inactivemq.xml). For IBM MQ, define an AMQP channel, as the JMS adapter page shows. - A durable topic subscription keeps Mirth's subscription name. Set
clientIdon the profile to the client id Mirth used, so the broker hands the same subscription over. - On the
soaptrigger, set the sender's login:wsSecurity: "UsernameToken"withwsUsernameandwsPassword, or an HMACsecret. Without either, only callers with an engine credential are accepted. Mirth's HTTP authentication is never imported. - If Mirth answered with a destination's response, set the trigger's
responseto{ "mode": "destination", "nodeId": "<step id>" }.
3. Test with synthetic data. Send the SOAP trigger the request a Mirth client sends: a SOAP 1.1 envelope (Content-Type: text/xml) whose Body holds Mirth's acceptMessage element with the message in arg0, for example a synthetic result:
MSH|^~\&|LAB|DEMO|||20261024||ORU^R01|TEST-1|P|2.5
PID|||TP-0001||TESTPATIENT^ALEXThe run's data is the text of arg0. For the JMS trigger, put a synthetic message on a test queue; the run's data is the message body, with messageId, correlationId and the JMS properties beside it.
4. Cut over. Deploy the workflow, then:
- JMS: stop the Mirth channel first. The broker hands each queue message to one consumer, and a durable subscription allows one connection per client id.
- SOAP: point the sender at
https://<engine>/api/triggers/soap/<listenerId>. A client generated from Mirth's WSDL can fetch the new one at?wsdl; its address is the engine's public URL.
Status
Available on this release. A channel that uses JNDI lookups or IBM MQ's native client imports with a finding, and you set the broker on the connection by hand.
The JMS trigger acknowledges a message only once its run is recorded, so a crash redelivers it and the message id stops it running twice. See JMS.