Send
Sends a single HL7 message via MLLP.
Task version: 1.6.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Task Parameters
Hl7Message : String
HL7 message to send over MLLP.
Default: MSH|^
Example: &|SendingApp|SendingFac|ReceivingApp|ReceivingFac|20250101010101||ADT^A01|MSG00001|P|2.5.1\rEVN|A01|20250101010101\rPID|1||12345^^^Hospital^MR||Doe^John||19800101|MMSH|^\&|SendingApp|SendingFac|ReceivingApp|ReceivingFac|20250101010101||ADT^A01|MSG00001|P|2.5.1\rEVN|A01|20250101010101\rPID|1||12345^^^Hospital^MR||Doe^John||19800101|M
Host : String
Hostname or IP address of the MLLP listener.
Default: 127.0.0.1
Example: 127.0.0.1
Port : Int32
TCP port of the MLLP listener.
Default: 2575
Example: 2575
TlsMode : TlsMode
The TLS encryption mode to use for the connection.
Possible values:
None: The TLS encryption mode to use for the connection.Mtls: The TLS encryption mode to use for the connection.
Default: 0
Example: TlsMode.None
ClientCertPath : String
Path to the client certificate file (PFX or P12 format).
Required only for MTLS mode.
Default: -
Example: C:\certs\client.pfx
🗝ClientCertPassword : String
Password for the client certificate.
Default: -
Example: MyStrongPassword123
ConnectTimeoutSeconds : Int32
Connection timeout in seconds when opening the socket.
Default: 30
Example: 30
ReadTimeoutSeconds : Int32
Read timeout in seconds when waiting for an acknowledgement.
Default: 30
Example: 30
IgnoreServerCertificateErrors : Boolean
If enabled, the task will ignore server-side certificate validation errors.
(e.g., self-signed certificates or hostname mismatches).
Default: False
Example: false
ServerCertificateThumbprints : String[]
Expected server certificate thumbprint(s) for validation.
Only used when IgnoreServerCertificateErrors is false.
Used in MTLS mode for certificate pinning.
Default: -
Example: E5FA62B8B5F3B0B2B3B4B5B6B7B8B9B0B1B2B3B4
Encoding : FileEncoding
Encoding used to encode the HL7 message before sending.
Possible values:
UTF8: Encoding used to encode the HL7 message before sending.Default: Encoding used to encode the HL7 message before sending.ASCII: Encoding used to encode the HL7 message before sending.Unicode: Encoding used to encode the HL7 message before sending.Windows1252: Encoding used to encode the HL7 message before sending.Other: Encoding used to encode the HL7 message before sending.
Default: 0
Example: FileEncoding.UTF8
EncodingInString : String
Custom encoding name, used when Encoding is set to Other.
Default: -
Example: iso-8859-1
ValidateWithNhapi : Boolean
Validate and normalize the HL7 payload using NHapi before sending.
Default: True
Example: true
ExpectAcknowledgement : Boolean
Read the acknowledgement from the listener after sending the message.
Default: True
Example: true
StartBlockByte : Byte
The MLLP start-block framing byte (decimal). Default is 11 (0x0B, vertical tab).
Default: 11
Example: 11
EndBlockByte : Byte
The MLLP end-block framing byte (decimal). Default is 28 (0x1C, file separator).
Default: 28
Example: 28
CarriageReturnByte : Byte
The MLLP end-of-block trailer byte (decimal). Default is 13 (0x0D, carriage return).
Default: 13
Example: 13
MaxMessageSize : Int32
Maximum message size in bytes. Messages exceeding this limit will not be sent. 0 means unlimited.
Default: 0
Example: 1048576
AcceptableAckCodes : AcceptableAckCodes
Determines which ACK codes are considered a successful send.
Possible values:
All: Determines which ACK codes are considered a successful send.Success: Determines which ACK codes are considered a successful send.Error: Determines which ACK codes are considered a successful send.Reject: Determines which ACK codes are considered a successful send.
Default: 1
Example: AcceptableAckCodes.Success
KeepConnectionAlive : Boolean
Keep the TCP connection alive and reuse it across multiple executions.
When enabled, the connection is cached for the duration of the sliding expiration window.
Default: False
Example: false
ConnectionCacheExpirationMinutes : Int32
How long (in minutes) an idle cached connection is kept alive before being closed.
Only used when KeepConnectionAlive is true.
Default: 5
Example: 5
RetryCount : Int32
Number of times to retry sending the message if an error occurs. 0 means no retries (single attempt).
Default: 0
Example: 3
RetryIntervalSeconds : Int32
Delay in seconds between retry attempts. Only used when RetryCount is greater than 0.
Default: 5
Example: 5
EnableLogging : Boolean
Enable message processing logging to file.
Default: False
Example: true
LogFilePath : String
File path for logging message send events. If not specified, logs to a default location.
Default: -
Example: C:\Logs\mllp-messages.log
LogMessageContent : Boolean
Include full message content in logs. If false, only logs message metadata and status.
Default: False
Example: false
ThrowErrorOnFailure : Boolean
Whether to throw an error on failure.
Default: True
Example: false
ErrorMessageOnFailure : String
Overrides the error message on failure.
Default: -
Example: Custom error message
Task Result
Success : Boolean
Indicates if the task completed successfully.
Example: true
Output : String
Acknowledgement returned by the MLLP listener.
Example: MSH|^~&|...
AckResultType : AckResultType
Classification of the received acknowledgement (Accept, Error, Reject, Invalid, or NotApplicable for one-way sends). Possible values: - Accept: Classification of the received acknowledgement (Accept, Error, Reject, Invalid, or NotApplicable for one-way sends). - Error: Classification of the received acknowledgement (Accept, Error, Reject, Invalid, or NotApplicable for one-way sends). - Reject: Classification of the received acknowledgement (Accept, Error, Reject, Invalid, or NotApplicable for one-way sends). - Invalid: Classification of the received acknowledgement (Accept, Error, Reject, Invalid, or NotApplicable for one-way sends). - NotApplicable: Classification of the received acknowledgement (Accept, Error, Reject, Invalid, or NotApplicable for one-way sends).
Example: AckResultType.Accept
AckCodeValue : String
The raw acknowledgement code extracted from MSA-1 (e.g. AA, AE, AR). Null if no ACK was received or parsing failed.
Example: AA
AckErrorDescription : String
Error or status description extracted from MSA-3, present on negative acknowledgements.
Example: Required field PID-3 is missing
Error : Error
Error that occurred during task execution.
Example: object { string Message, Exception AdditionalInfo }
Task Changelog
Changelog for Task Frends.Mllp.Send.
[1.6.0] - 2026-08-06
Changed
Updated copyright notice to comply with Frends standard requirements.
[1.5.0] - 2026-06-22
Added
Options.MaxMessageSizeto reject outgoing messages exceeding a configurable size limit (0 = unlimited), logged as MESSAGE REJECTED when enabledOptions.KeepConnectionAliveandOptions.ConnectionCacheExpirationMinutesto reuse a single MLLP connection across multiple Send executions instead of opening a new connection each timeOptions.RetryCountandOptions.RetryIntervalSecondsto automatically retry sending on failure, with a configurable delay between attemptsACK parsing and classification (AckResultType: Accept, Error, Reject, Invalid, NotApplicable) based on MSA-1/MSA-3, returned via Result.AckResultType, Result.AckCodeValue, and Result.AckErrorDescription
Options.AcceptableAckCodesto configure which ACK classifications are treated as a successful send (All, Success, Error, Reject)Options.EnableLogging,Options.LogFilePath, andOptions.LogMessageContentto log message send events (sent, success, failure, rejected, retry, connection dropped, ACK failure) to file
[1.4.0] - 2026-05-06
Added
Options.StartBlockByte,Options.EndBlockByte, andOptions.CarriageReturnByteto allow configuring MLLP framing bytes (defaults: 11, 28, 13)
[1.3.0] - 2026-04-17
Added
Connection.ServerCertificateThumbprintsto allow pinning the expected server certificate in MTLS mode whenIgnoreServerCertificateErrorsisfalse
[1.2.0] - 2026-04-13
Changed
Connection.Encodingis now selectable and can be set custom by user
[1.1.0] - 2026-03-12
Added
Connection.Encodingparameter to allow configuring the character encoding used when sending HL7 messages (default:UTF-8)
[1.0.0] - 2026-02-05
Added
Initial implementation
Last updated
Was this helpful?

