Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Server
    Acts as a server if the 'Create Socket?' property is enabled. In the Server mode, this microservice creates a socket on the configured port provided in the component property sheet and listens for connections. Once a connection is created, messages coming on the input port will be sent to the connected client/clients and the messages received from the client will be sent to the output port.
  • Client
    Acts as a client if the 'Create Socket ?' property is enableddisabled. In the Client mode, this microservice connects to the socket configured. If a successful connection is made, then the message coming on the input port will be sent to the server and the received messages will be sent to the output port.

...

Configuration attributes in the SocketAdapter Configuration Property Sheet (CPS) with Expert Properties enabled are explained below.

Image RemovedImage Added
Figure 1: SocketAdapter Configuration CPS

Error handling configuration

The actions that needs need to be taken when a particular error occurs can be configured using this attribute. 

...

Note

In a simple Client-Server Socket scenerioscenario, 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.

...

Length of the largest message in the messages that are expected to receive. While decoding messages based on the delimiter, if a delimiter is not received till this length, then a BufferDataException will occur.

...

This property specifies the numeric type in which the total message length is present within in the message.

Numeric types available are:

...

The actual time taken to close the idle connections will be between the configured time and double that time. The default value is 240000 milliseconds.

Is

...

synchronous?

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.

...

Note


Figure 8: CPS with SSH and Key Pair properties enabled

...

This property will be visible in the CPS only if the Create Socket property is enabled and hence is displayed only at on the server side. This property is used to deny access to a particular client or a set of clients as specified using the IP addresses.

When this property is enabled, Blocked Clients IP Pattern property gets visible where the IP pattern referring to the clients who needs need to be blocked can be specified.

...

Provide the IP address or a range of IP addresses to deny access of to a particular client or multiple clients respectively.

...

Figure 11: Attributes to specify the Idle time

Session Limit

The number of active sessions connecting to the server; it restricts to the number that is specified. The default value is "0" which indicates that the server has no limit in creating sessions.

Functional Demonstration

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.

...

The following Sample flow has one socket adapter acting as a 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 a response within the configured suspendtimeout (10 sec), then the next request message sent by the client will be processed and a timeout error message is sent to the Error port of the client.

...

Info

Is Synchronous? option can be The used with any Decode Type (Delimiter/ Length/None).

...

Adaptavist ThemeBuilder EngineAtlassian Confluence