INT-2050 Code Polishing
INT-1876 Add AutoStart and Phase to TCP Endpoints There was no way for an application to control the startup of TCP endpoints. This is particularly an issue for controlling availability of inbound endpoints. The TCP Endpoints are mostly static, with dynamic behavior being contained in connection factories. The factories implement SmartLifecycle but there is no way to configure auto-startup. Adds auto-startup and phase attributes to all TCP endpoints Starting/stopping an endpoint will start/stop the underlying connection factory. When a connection factory is stopped, all open connections are closed, and no new connections will be acceptedi (inbound) or allowex (outbound). While the factories implement SmartLifecycle, they return false to auto-startup. We rely on the fact that the endpoints are dependent on factories and the factories will be started because of this dependency. Finally, with collaborating endpoints (where an inbound and outbound adapter are bound to the same factory), starting/ stopping one endpoint will affect the collaborating endpoint too. INT-1876 Polish Schema Docs Doc was incorrectly talking about connection factories instead of endpoints. INT-2162 Add apply-sequence to Connection Factory When messages are generated as a result of incoming tcp messages, and this attribute is true (default=false), the sequenceNumber and correlationId headers will be set. This will facilitate downstream resequencing if necessary. The 'ip_connection_id' header is still required for internal correlation of reply messages to the right socket (regardless of whether downstream components have altered the correlationId), and will contain the same value as the correlationId (if set). This will not use up more memory for the header content because they will both point to the same heap object. The 'ip_connection_seq' header is deprecated and may be removed in a future release. TcpConnection.getConnectionSeq() has been renamed to incrementAndGetConnectionSequence() because it is not a simple getter method, it increments the connection's sequence number. INT-2162 Update Docs for apply-sequence Add documentation for apply-sequence attribute on TCP Connection Factories.
This commit is contained in:
committed by
Mark Fisher
parent
03d6105f51
commit
7981855c78
@@ -652,7 +652,7 @@
|
||||
Two sequential
|
||||
messages arriving on the <emphasis>same</emphasis> socket <emphasis>might</emphasis>
|
||||
be processed by different threads. This means that the order in which the messages are
|
||||
sent to the channel is indeterminate; the strict ordering of the messages on the
|
||||
sent to the channel is indeterminate; the strict ordering of the messages arriving on the
|
||||
socket is not maintained.
|
||||
</para>
|
||||
<para>
|
||||
@@ -660,6 +660,14 @@
|
||||
is required, consider setting <classname>using-nio</classname> to false
|
||||
and using async handoff.
|
||||
</para>
|
||||
<para>
|
||||
Alternatively, you may choose to insert a resequencer downstream of the inbound endpoint to
|
||||
return the messages to their proper sequence. Set <emphasis>apply-sequence</emphasis>
|
||||
to true on the connection factory, and messages arriving on a TCP connection will
|
||||
have <emphasis>sequenceNumber</emphasis> and <emphasis>correlationId</emphasis> headers
|
||||
set. The resequencer uses these headers to return the messages to their proper
|
||||
sequence.
|
||||
</para>
|
||||
</section>
|
||||
<section id="ip-endpoint-reference">
|
||||
<title>IP Configuration Attributes</title>
|
||||
@@ -727,7 +735,7 @@
|
||||
<entry>true, false</entry>
|
||||
<entry>Whether or not connection uses NIO. Refer to the java.nio
|
||||
package for more information.
|
||||
See <xref linkend="note_nio" />.
|
||||
See <xref linkend="note_nio" />.
|
||||
Default false.</entry>
|
||||
</row>
|
||||
<row>
|
||||
@@ -739,6 +747,18 @@
|
||||
Refer to <classname>java.nio.ByteBuffer</classname> documentation for
|
||||
more information. Must be false if using-nio is false. </entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>apply-sequence</entry>
|
||||
<entry>Y</entry>
|
||||
<entry>Y</entry>
|
||||
<entry>true, false</entry>
|
||||
<entry>When using NIO, it may be necessary to resequence messages. When this
|
||||
attribute is set to true, <emphasis>correlationId</emphasis> and
|
||||
<emphasis>sequenceNumber</emphasis> headers will be added to
|
||||
received messages.
|
||||
See <xref linkend="note_nio" />.
|
||||
Default false.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>so-timeout</entry>
|
||||
<entry>Y</entry>
|
||||
|
||||
Reference in New Issue
Block a user