Added a comment on the 'apply-sequence' attribute for PublishSubscribeChannels and a note about 'capacity' settings on a queue sub-element
This commit is contained in:
@@ -299,10 +299,15 @@ public Message<?> receive(final PollableChannel<?> channel) { ... }]]></programl
|
||||
<title>QueueChannel Configuration</title>
|
||||
<para>
|
||||
To create a <classname>QueueChannel</classname>, use the "queue" sub-element.
|
||||
You must specify the channel's capacity:
|
||||
You may specify the channel's capacity:
|
||||
<programlisting language="xml"><channel id="exampleChannel">
|
||||
<queue capacity="25"/>
|
||||
</channel></programlisting>
|
||||
<note>
|
||||
If you do not provide a value for the 'capacity' attribute on this <queue/> sub-element,
|
||||
the resulting queue will be unbounded. To avoid issues such as OutOfMemoryErrors, it's highly
|
||||
recommended to set an explicit value for a bounded queue.
|
||||
</note>
|
||||
</para>
|
||||
</section>
|
||||
<section id="channel-configuration-pubsubchannel">
|
||||
@@ -312,6 +317,13 @@ public Message<?> receive(final PollableChannel<?> channel) { ... }]]></programl
|
||||
When using this element, you can also specify the "task-executor" used for publishing
|
||||
Messages (if none is specified it simply publishes in the sender's thread):
|
||||
<programlisting language="xml"><publish-subscribe-channel id="exampleChannel" task-executor="someTaskExecutor"/></programlisting>
|
||||
If you are providing a <emphasis>Resequencer</emphasis> or <emphasis>Aggregator</emphasis> downstream
|
||||
from a <classname>PublishSubscribeChannel</classname>, then you can set the 'apply-sequence' property
|
||||
for the channel. That will indicate that the channel should set the sequence-size and sequence-number
|
||||
Message headers prior to passing the Messages along. For example, if there are 5 subscribers, the
|
||||
sequence-size would be set to 5, and the Messages would have sequence-number header values ranging
|
||||
from 1 to 5. This value is 'false' by default.
|
||||
<programlisting language="xml"><publish-subscribe-channel id="exampleChannel" apply-sequence="true"/></programlisting
|
||||
</para>
|
||||
</section>
|
||||
<section id="channel-configuration-prioritychannel">
|
||||
@@ -336,7 +348,8 @@ public Message<?> receive(final PollableChannel<?> channel) { ... }]]></programl
|
||||
<section id="channel-configuration-rendezvouschannel">
|
||||
<title>RendezvousChannel Configuration</title>
|
||||
<para>
|
||||
The <classname>RendezvousChannel</classname> does not provide any additional configuration options.
|
||||
A <classname>RendezvousChannel</classname> is created when the queue sub-element is
|
||||
a <rendezvous-queue>. It does not provide any additional configuration options.
|
||||
<programlisting language="xml"><![CDATA[<channel id="exampleChannel"/>
|
||||
<rendezvous-queue/>
|
||||
</channel>
|
||||
|
||||
Reference in New Issue
Block a user