The Batch / De-batch filter can be used to combine separate messages into a single file or to separate a batched file into its components.
To define the size of the batch message created, the message collection properties of the filter are used. Refer to Message Collector for details on message collection.
Configuration Properties
Property |
Description |
---|---|
Mode |
Determines the mode of the filter:
|
Header |
Identifies the string that appears at the beginning of the batched file. Can include special formatting sequences. Refer to Formatting Sequences for details. Available only in Batch mode. |
Separator |
Identifies the string that separates messages within the batched file. Can include special formatting sequences. Refer to Formatting Sequences for details. Available only in Batch mode. |
Trailer |
Identifies the string that appears at the end of the batched file. Can include special formatting sequences. Refer to Formatting Sequences for details. Available only in Batch mode. |
Batch Header Expression |
Identifies the string that appears at the beginning of the file to be de-batched. Cannot end with a pipe (" Available only in De-batch mode. |
Batch Trailer Expression |
Identifies the string that appears at the end of the file to be de-batched. Available only in De-batch mode. |
Separator Type |
Identifies whether messages in the file to be de-batched are separated by a marker or a separator:
Available only in De-batch mode. |
Message Separator Expression |
The regular expression that identifies the message separator. This string is a POSIX (Portable Operating System Interface) regular expression. Refer to IEEE's Portable Application Standards Committee for details. Messages to be de-batched are treated as a byte stream. Therefore ensure you use the appropriate regular expression when Separator Type is set to marker. For example, if you want to de-batch on all instances of "MSH|", you should enter Available only in De-batch mode. |
Set Identifier Property | Specifies the property name that each message uses to identify the batched message that it belongs to. |
Index Base |
Determines the index base used to batch the message set. Selecting a zero-based index (
|
Formatting Sequences
The character sequences described in the following table can be used in the Header, Separator, and Trailer configuration properties to control the output in a created batch of messages for the respective part.
Character Sequence |
Description |
---|---|
|
New line. |
|
Carriage return. |
|
Character with code given by hexadecimal 2-digit number (d - hex digit). |
|
Backslash (\) character. |
|
Current message number (starting from 0) in the batch of messages when used in the Separator configuration property. It is always -1 when used in context of Header or Trailer properties. |
|
Total number of messages in the batch. |
|
Formats current date-time using formatting string given. The following formatting characters are allowed:
Refer to the documentation for the Java class SimpleDateFormat for the full date-time format. |
|
Percent (%) character |
|
Dollar ($) character |
Published Properties
Published properties for the Batch / De-batch filter are:
TotalNumberOfBatchedMessages
- the total number of messages that are included in the batched message.BatchIndex
- the index of this message within the batched message. The filter's Index Base configuration property determines whether the index is zero-based or one-based.<
Set Identifier Property>
- the unique identifier identifying the batched message that this message belongs to. The property name is user-specified through the filter's Set Identifier Property configuration property.
These properties are only populated when De-batch mode has been selected.