...
- Delimiter: Messages are decoded based on the delimiter configured.
- Length: Messages are decoded based on the length of the message.
- None: All the messages present in the stream are fetched.
- ISO: Messages are decoded based on the ISO standards.
Delimiter
Info |
---|
If the Decoding Type property value is 'Delimiter', then the following properties will be visible,
The Decoding Type is set to 'Delimiter' by default. |
Delimiter
Delimiter is to be used as an end of the message.
Info |
---|
Hexadecimal Delimiters can also be used. For hexadecimal delimiter, it should start with "0x" . For example, if you want to use "1F" as hexadecimal delimiter, then provide delimiter as "0x1F" |
Note |
---|
This message gets enabled only when the Decoding Type property value is 'Delimiter'. |
Append Delimiter while sending message
If enabled, delimiter provided in the configuration will be appended to the input message before sending it to the socket.
Note |
---|
In a simple Client-Server Socket scenerio, the Append Delimiter while sending message property should be enabled. As the message received at the input port of the Server does not contain a delimiter (message is processed based on client configuration, based on delimiter), this property appends the delimiter to the message on the input port of Server. |
Include Delimiter in the received message
This property is visible only when Decoding type is Delimiter Based. Upon decoding the received data from the socket, messages will be sent to the output port with the delimiter included in it.
Maximum Message Length (bytes)
Length of the largest message in the messages that are expected to receive. This property is visible only when Decoding type is Delimiter Based. While decoding messages based on delimiter, if a delimiter is not received till this length, then a BufferDataException will occur.
Note |
---|
|
...
Length
If enabled, messages will be decoded based on the length of the message.
Message Length(bytes)
This property specifies the length of the message in case of Length Based decoding.
Note |
---|
This property is visible only when the property Decoding Type is set to Length Basedbased.
|
This property is given by number the number of bytes. For the Message Type ' 'Text', for UTF-8 charset:1 char is 1 byte; for UTF-16 charset: 1 char is 2 bytes.
ISO
Info |
---|
If the Decoding Type property value is 'ISO', then the following properties will be visible above the Decoding Type property,
|
Message Length Numeric Type
This property specifies the numeric type in which the total message length is present within the message.
Numeric types available are:
- Hexadecimal
- Decimal
- Bytes
The Message Length Numeric Type is set to 'Decimal' by default.
No of Chars in Message Length Field
This property specifies the number of characters to be present in the ISO message length field.
Note |
---|
This property is visible only when the Message Length Numeric Type property is set to either 'Hexadecimal' or 'Decimal'. |
Write Timeout for Session (milli secondsmilliseconds)
Session expires if a write operation (while sending messages to socket) exceeds the value of time provided for this property.
...
Synchronous communication happens between a client and the server. Messages from the client are sent to the server till the client receives a response and if no response is received from the server till the given Suspend Timeout (gets visible when this property is enabled), then a timeout message is sent to the exception port and the next request is processed. Suspend Timeout (gets visible when this property is enabled), then a timeout message is sent to the exception port and the next request is processed.
Figure 56: Synchronous Communication options
...
Suspend Timeout (milli seconds)
If the message send sent by a client takes more time than suspend timeout the Suspend Timeout to execute, then the next message is sent.
Note |
---|
This property is visible only when IsSynchronous? property is disabled, for Client. |
Enable SSL?
By enabling SSL and providing the required key store/trust store with respective passwords, secure message transfer can be achieved.
Figure 67: SSL Configuration
IsSSHEnabled?
...
Note |
---|
|
Figure 78: CPS with SSH and Key Pair properties enabled
...
The following Sample flow has two socket microservices, one acting as the server and the other as client. After receiving requests from the client, the server will send it to the SMTP component connected to its output port, and then the response from the SMTP component is, in turn, sent back to the client.
Figure 89: Sample Event Process
Scenario 1: Decode Type as 'Delimiter'
'SampleServer' Component Configuration is shown in the following figure.
Figure 910: Socket Adapter Configuration in Server mode
'SampleClient' Component Configuration is shown in the following figure.
Figure 1011: Socket Adapter Configuration in Client mode
...
'SampleServer' Component Configuration is shown in the following figure.
Figure 1112: Socket Adapter Configuration in Server mode
'SampleClient' Component Configuration is shown in the following figure.
Figure 1213: Socket Adapter Configuration in Client mode
...
The following Sample flow has one socket adapter acting as client. After receiving requests from the client, the configured WSSStub (as Server) sends the response back to the client. In the client configuration, SuspendTimeout is 10 sec. If the client fails to receive response within the configured suspendtimeout (10 sec), then the next request message sent by client will be processed and a timeout error message is sent to the Error port of the client.
Figure 1314: Sample Event Process
Figure 1415: Socket Adapter Configuration in Client mode for Synchronous Communication
Figure 1516: Sample Request
Figure 1617: Sample Response
Info |
---|
Is Synchronous? option can be used with any Decode Type (Delimiter/ Length/None). |
...