For the latest stable version, please use Spring Integration 6.4.0!spring-doc.cn

IP Configuration Attributes

The following table describes attributes that you can set to configure IP connections:spring-doc.cn

Table 1. Connection Factory Attributes
Attribute Name Client? Server? Allowed Values Attribute Description

typespring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

client, serverspring-doc.cn

Determines whether the connection factory is a client or a server.spring-doc.cn

hostspring-doc.cn

Yspring-doc.cn

Nspring-doc.cn

The host name or IP address of the destination.spring-doc.cn

portspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

The port.spring-doc.cn

serializerspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

An implementation of Serializer used to serialize the payload. Defaults to ByteArrayCrLfSerializerspring-doc.cn

deserializerspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

An implementation of Deserializer used to deserialize the payload. Defaults to ByteArrayCrLfSerializerspring-doc.cn

using-niospring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

true, falsespring-doc.cn

Whether the connection uses NIO. Refer to the java.nio package for more information. See About Non-blocking I/O (NIO). Default: false.spring-doc.cn

using-direct-buffersspring-doc.cn

Yspring-doc.cn

Nspring-doc.cn

true, falsespring-doc.cn

When using NIO, whether the connection uses direct buffers. Refer to the java.nio.ByteBuffer documentation for more information. Must be false if using-nio is false.spring-doc.cn

apply-sequencespring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

true, falsespring-doc.cn

When you use NIO, it may be necessary to resequence messages. When this attribute is set to true, correlationId and sequenceNumber headers are added to received messages. See About Non-blocking I/O (NIO). Default: false.spring-doc.cn

so-timeoutspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

Defaults to 0 (infinity), except for server connection factories with single-use="true". In that case, it defaults to the default reply timeout (10 seconds).spring-doc.cn

so-send-buffer-sizespring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

See java.net.Socket. setSendBufferSize().spring-doc.cn

so-receive-buffer-sizespring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

See java.net.Socket. setReceiveBufferSize().spring-doc.cn

so-keep-alivespring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

true, falsespring-doc.cn

See java.net.Socket.setKeepAlive().spring-doc.cn

so-lingerspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

Sets linger to true with the supplied value. See java.net.Socket.setSoLinger().spring-doc.cn

so-tcp-no-delayspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

true, falsespring-doc.cn

See java.net.Socket.setTcpNoDelay().spring-doc.cn

so-traffic-classspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

See java.net.Socket. setTrafficClass().spring-doc.cn

local-addressspring-doc.cn

Nspring-doc.cn

Yspring-doc.cn

On a multi-homed system, specifies an IP address for the interface to which the socket is bound.spring-doc.cn

task-executorspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

Specifies a specific executor to be used for socket handling. If not supplied, an internal cached thread executor is used. Needed on some platforms that require the use of specific task executors, such as a WorkManagerTaskExecutor.spring-doc.cn

single-usespring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

true, falsespring-doc.cn

Specifies whether a connection can be used for multiple messages. If true, a new connection is used for each message.spring-doc.cn

pool-sizespring-doc.cn

Nspring-doc.cn

Nspring-doc.cn

This attribute is no longer used. For backward compatibility, it sets the backlog, but you should use backlog to specify the connection backlog in server factories.spring-doc.cn

backlogspring-doc.cn

Nspring-doc.cn

Yspring-doc.cn

Sets the connection backlog for server factories.spring-doc.cn

lookup-hostspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

true, falsespring-doc.cn

Specifies whether reverse lookups are done on IP addresses to convert to host names for use in message headers. If false, the IP address is used instead. Default: false.spring-doc.cn

interceptor-factory-chainspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

See TCP Connection Interceptors.spring-doc.cn

ssl-context-supportspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

See SSL/TLS Support.spring-doc.cn

socket-factory-supportspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

See SSL/TLS Support.spring-doc.cn

socket-supportspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

See SSL/TLS Support.spring-doc.cn

nio-connection-supportspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

See Advanced Techniques.spring-doc.cn

read-delayspring-doc.cn

Yspring-doc.cn

Yspring-doc.cn

long > 0spring-doc.cn

The delay (in milliseconds) before retrying a read after the previous attempt failed due to insufficient threads. Default: 100. Only applies if using-nio is true.spring-doc.cn

The following table describes attributes that you can set to configure UDP inbound channel adapters:spring-doc.cn

Table 2. UDP Inbound Channel Adapter Attributes
Attribute Name Allowed Values Attribute Description

portspring-doc.cn

The port on which the adapter listens.spring-doc.cn

multicastspring-doc.cn

true, falsespring-doc.cn

Whether or not the UDP adapter uses multicast.spring-doc.cn

multicast-addressspring-doc.cn

When multicast is true, the multicast address to which the adapter joins.spring-doc.cn

pool-sizespring-doc.cn

Specifies how many packets can be handled concurrently. It only applies if task-executor is not configured. Default: 5.spring-doc.cn

task-executorspring-doc.cn

Specifies a specific executor to be used for socket handling. If not supplied, an internal pooled executor is used. Needed on some platforms that require the use of specific task executors such as a WorkManagerTaskExecutor. See pool-size for thread requirements.spring-doc.cn

receive-buffer-sizespring-doc.cn

The size of the buffer used to receive DatagramPackets. Usually set to the maximum transmission unit (MTU) size. If a smaller buffer is used than the size of the sent packet, truncation can occur. You can detect this by using the check-length attribute..spring-doc.cn

check-lengthspring-doc.cn

true, falsespring-doc.cn

Whether a UDP adapter expects a data length field in the packet received. Used to detect packet truncation.spring-doc.cn

so-timeoutspring-doc.cn

See the setSoTimeout() methods in java.net.DatagramSocket for more information.spring-doc.cn

so-send-buffer-sizespring-doc.cn

Used for UDP acknowledgment packets. See the setSendBufferSize() methods in java.net.DatagramSocket for more information.spring-doc.cn

so-receive-buffer-sizespring-doc.cn

See java.net.DatagramSocket.setReceiveBufferSize() for more information.spring-doc.cn

local-addressspring-doc.cn

On a multi-homed system, specifies an IP address for the interface to which the socket is bound.spring-doc.cn

error-channelspring-doc.cn

If a downstream component throws an exception, the MessagingException message that contains the exception and failed message is sent to this channel.spring-doc.cn

lookup-hostspring-doc.cn

true, falsespring-doc.cn

Specifies whether reverse lookups are done on IP addresses to convert to host names for use in message headers. If false, the IP address is used instead. Default: false.spring-doc.cn

The following table describes attributes that you can set to configure UDP outbound channel adapters:spring-doc.cn

Table 3. UDP Outbound Channel Adapter Attributes
Attribute Name Allowed Values Attribute Description

hostspring-doc.cn

The host name or ip address of the destination. For multicast udp adapters, the multicast address.spring-doc.cn

portspring-doc.cn

The port on the destination.spring-doc.cn

multicastspring-doc.cn

true, falsespring-doc.cn

Whether or not the udp adapter uses multicast.spring-doc.cn

acknowledgespring-doc.cn

true, falsespring-doc.cn

Whether a UDP adapter requires an acknowledgment from the destination. When enabled, it requires setting the following four attributes: ack-host, ack-port, ack-timeout, and min-acks-for- success.spring-doc.cn

ack-hostspring-doc.cn

When acknowledge is true, indicates the host or IP address to which the acknowledgment should be sent. Usually the current host, but may be different — for example, when Network Address Translation (NAT) is being used.spring-doc.cn

ack-portspring-doc.cn

When acknowledge is true, indicates the port to which the acknowledgment should be sent. The adapter listens on this port for acknowledgments.spring-doc.cn

ack-timeoutspring-doc.cn

When acknowledge is true, indicates the time in milliseconds that the adapter waits for an acknowledgment. If an acknowledgment is not received in time, the adapter throws an exception.spring-doc.cn

min-acks-for- successspring-doc.cn

Defaults to 1. For multicast adapters, you can set this to a larger value, which requires acknowledgments from multiple destinations.spring-doc.cn

check-lengthspring-doc.cn

true, falsespring-doc.cn

Whether or not a UDP adapter includes a data length field in the packet sent to the destination.spring-doc.cn

time-to-livespring-doc.cn

For multicast adapters, specifies the time-to-live attribute for the MulticastSocket. Controls the scope of the multicasts. Refer to the Java API documentation for more information.spring-doc.cn

so-timeoutspring-doc.cn

See java.net.DatagramSocket setSoTimeout() methods for more information.spring-doc.cn

so-send-buffer-sizespring-doc.cn

See the setSendBufferSize() methods in java.net.DatagramSocket for more information.spring-doc.cn

so-receive-buffer-sizespring-doc.cn

Used for UDP acknowledgment packets. See the setReceiveBufferSize() methods in java.net.DatagramSocket for more information.spring-doc.cn

local-addressspring-doc.cn

On a multi-homed system, for the UDP adapter, specifies an IP address for the interface to which the socket is bound for reply messages. For a multicast adapter, it also determines which interface the multicast packets are sent over.spring-doc.cn

task-executorspring-doc.cn

Specifies a specific executor to be used for acknowledgment handling. If not supplied, an internal single threaded executor is used. Needed on some platforms that require the use of specific task executors, such as a WorkManagerTaskExecutor. One thread is dedicated to handling acknowledgments (if the acknowledge option is true).spring-doc.cn

destination-expressionspring-doc.cn

SpEL expressionspring-doc.cn

A SpEL expression to be evaluated to determine which SocketAddress to use as a destination address for the outgoing UDP packets.spring-doc.cn

socket-expressionspring-doc.cn

SpEL expressionspring-doc.cn

A SpEL expression to be evaluated to determine which datagram socket use for sending outgoing UDP packets.spring-doc.cn

The following table describes attributes that you can set to configure TCP inbound channel adapters:spring-doc.cn

Table 4. TCP Inbound Channel Adapter Attributes
Attribute Name Allowed Values Attribute Description

channelspring-doc.cn

The channel to which inbound messages is sent.spring-doc.cn

connection-factoryspring-doc.cn

If the connection factory has a type of server, the factory is “owned” by this adapter. If it has a type of client, it is “owned” by an outbound channel adapter, and this adapter receives any incoming messages on the connection created by the outbound adapter.spring-doc.cn

error-channelspring-doc.cn

If an exception is thrown by a downstream component, the MessagingException message containing the exception and the failed message is sent to this channel.spring-doc.cn

client-modespring-doc.cn

true, falsespring-doc.cn

When true, the inbound adapter acts as a client with respect to establishing the connection and then receiving incoming messages on that connection. Default: false. See also retry-interval and scheduler. The connection factory must be of type client and have single-use set to false.spring-doc.cn

retry-intervalspring-doc.cn

When in client-mode, specifies the number of milliseconds to wait between connection attempts or after a connection failure. Default: 60000 (60 seconds).spring-doc.cn

schedulerspring-doc.cn

true, falsespring-doc.cn

Specifies a TaskScheduler to use for managing the client-mode connection. If not specified, it defaults to the global Spring Integration taskScheduler bean, which has a default pool size of 10. See Configuring the Task Scheduler.spring-doc.cn

The following table describes attributes that you can set to configure TCP outbound channel adapters:spring-doc.cn

Table 5. TCP Outbound Channel Adapter Attributes
Attribute Name Allowed Values Attribute Description

channelspring-doc.cn

The channel on which outbound messages arrive.spring-doc.cn

connection-factoryspring-doc.cn

If the connection factory has a type of client, the factory is “owned” by this adapter. If it has a type of server, it is “owned” by an inbound channel adapter, and this adapter tries to correlate messages to the connection on which an original inbound message was received.spring-doc.cn

client-modespring-doc.cn

true, falsespring-doc.cn

When true, the outbound adapter tries to establish the connection as soon as it is started. When false, the connection is established when the first message is sent. Default: false. See also retry-interval and scheduler. The connection factory must be of type client and have single-use set to false.spring-doc.cn

retry-intervalspring-doc.cn

When in client-mode, specifies the number of milliseconds to wait between connection attempts or after a connection failure. Default: 60000 (60 seconds).spring-doc.cn

schedulerspring-doc.cn

true, falsespring-doc.cn

Specifies a TaskScheduler to use for managing the client-mode connection. If not specified, it defaults to the global Spring Integration taskScheduler bean, which has a default pool size of 10. See Configuring the Task Scheduler.spring-doc.cn

The following table describes attributes that you can set to configure TCP inbound gateways:spring-doc.cn

Table 6. TCP Inbound Gateway Attributes
Attribute Name Allowed Values Attribute Description

connection-factoryspring-doc.cn

The connection factory must be of type server.spring-doc.cn

request-channelspring-doc.cn

The channel to which incoming messages are sent.spring-doc.cn

reply-channelspring-doc.cn

The channel on which reply messages may arrive. Usually, replies arrive on a temporary reply channel added to the inbound message header.spring-doc.cn

reply-timeoutspring-doc.cn

The time in milliseconds for which the gateway waits for a reply. Default: 1000 (1 second).spring-doc.cn

error-channelspring-doc.cn

If an exception is thrown by a downstream component, the MessagingException message containing the exception and the failed message is sent to this channel. Any reply from that flow is then returned as a response by the gateway.spring-doc.cn

client-modespring-doc.cn

true, falsespring-doc.cn

When true, the inbound gateway acts as a client with respect to establishing the connection and then receiving (and replying to) incoming messages on that connection. Default: false. See also retry-interval and scheduler. The connection factory must be of type client and have single-use set to false.spring-doc.cn

retry-intervalspring-doc.cn

When in client-mode, specifies the number of milliseconds to wait between connection attempts or after a connection failure. Default: 60000 (60 seconds).spring-doc.cn

schedulerspring-doc.cn

true, falsespring-doc.cn

Specifies a TaskScheduler to use for managing the client-mode connection. If not specified, it defaults to the global Spring Integration taskScheduler bean, which has a default pool size of 10. See Configuring the Task Scheduler.spring-doc.cn

The following table describes attributes that you can set to configure TCP outbound gateways:spring-doc.cn

Table 7. TCP Outbound Gateway Attributes
Attribute Name Allowed Values Attribute Description

connection-factoryspring-doc.cn

The connection factory must be of type client.spring-doc.cn

request-channelspring-doc.cn

The channel on which outgoing messages arrive.spring-doc.cn

reply-channelspring-doc.cn

Optional. The channel to which reply messages are sent.spring-doc.cn

remote-timeoutspring-doc.cn

The time in milliseconds for which the gateway waits for a reply from the remote system. Mutually exclusive with remote-timeout-expression. Default: 10000 (10 seconds). Note: In versions prior to 4.2 this value defaulted to reply-timeout (if set).spring-doc.cn

remote-timeout-expressionspring-doc.cn

A SpEL expression that is evaluated against the message to determine the time in milliseconds for which the gateway waits for a reply from the remote system. Mutually exclusive with remote-timeout.spring-doc.cn

request-timeoutspring-doc.cn

If a single-use connection factory is not being used, the time in milliseconds for which the gateway waits to get access to the shared connection.spring-doc.cn

reply-timeoutspring-doc.cn

The time in milliseconds for which the gateway waits when sending the reply to the reply-channel. Only applies if the reply-channel might block (such as a bounded QueueChannel that is currently full).spring-doc.cn

asyncspring-doc.cn

Release the sending thread after the send; the reply (or error) will be sent on the receiving thread.spring-doc.cn

unsolicited MessageChannelspring-doc.cn

A channel to which to send unsolicited messages and late replies.spring-doc.cn