The MLLP Receive Component allows you to receive MLLP messages from a SQL Server Integration Services control-flow. MLLP stands for Minimal Low Level Protocol, and provides a simple binary TCP protocol for exchanging data. MLLP is most commonly used with HL7 data. Messages can be processed synchronously by waiting for the component to finish
blocking on receipt of a message, or asynchronously by handling the
OnReceiveMessage event.
To use this component you must first configure the
BlueSSIS MLLP Gateway application, which is installed with BlueSSIS. This can be found in the BlueSSIS / MLLP Gateway program group under the Start menu.
The
BlueSSIS MLLP Gateway application is an MLLP listener that receives messages and stores them in a SQL Server database, ready for collection by the MLLP Receive component, and the configuration tool presents the following interface :
You must specify a connection to a SQL Server messaging database here (click the
browse button to create one) - note that this is the same database format used
for AS2 and web service messages and can be shared between components. You can install and control the underlying Windows service that listens for MLLP messages, and configure listeners on individual ports.
For each individual port you can specify a queue name (which can be used as a
filter when picking up nessages), and you can also configure a receipt to be
automatically sent for HL7 messages. You can also select whether a
response should be sent for incoming messages - in this case the gateway will
wait up until the specified timeout for a SQL Server Integration Services
package to pick up the message (via an MLLP Receive component) and send a
response (via an
MLLP Respond component).
Configuring the MLLP Receive Component
The MLLP Receive Component is easily configured via the following interface :
Here you simply specify a variable to receive the incoming message, optionally a variable to receive the identifier of the incoming message (required if you want to respond to the message), a database connection to the SQL Server messaging database specified for the MLLP Gateway, and a queue name corresponding to the messages you want to retrieve. The message variable should be of type string or object, if this is a string then the Encoding property available in the Properties window is used to convert from binary.
The Timeouts tab enables you to configure how long your component will wait to
receive an AS2 message.
There are two modes of operation - synchronous and asynchronous. In
synchronous mode the task effectively blocks until a file is received, whereupon
it completes and linked tasks can execute. In asynchronous mode you would
typically handle the
OnReceiveMessage event
exposed by the component to handle messages as they arrive. This event has
no parameters, as the received message is already bound to a variable.
The
Delay between poll attempts field allows you to configure the number
of seconds between successive checks on the messaging database to determine if
any matching messages have arrived. The
Get timeout field is the
total number of seconds for the component to wait for a message to arrive before
giving up. The
Fail task on Get timeout option allows you to
determine if such a state should trigger a failure of the component.
Otherwise you can check if a file was retrieved by checking the Message variable
(which will have empty content if no message was retrieved) or using the
ExecValueVariable result.
0 and -1 are special cases for
Get timeout, relating to a zero or
infinite timeout respectively. In the case of a zero timeout, this means
that the component will not wait if there is no message waiting in the messaging
database.
Note that you can also execute this task within a Foreach Loop Container task, to execute the contained tasks once for every file retrieved. Simply select 'BlueSSIS +MLLP Message Enumerator' as the Enumerator, then click the 'Configure...' button to configure the properties.
BlueSSIS provides a number of enumerators, mostly mapping to associated data retrieval tasks, but also including an Infinite Loop enumerator (useful for manual polling scenarios).