polishing, edited the docs
This commit is contained in:
@@ -64,14 +64,11 @@
|
||||
However in the SourcePollingChannelAdapter it is a bit different.
|
||||
The default value for <code>max-messages-per-poll</code> will be set to 1 by default unless you explicitly set it to
|
||||
a negative value (e.g., -1). It is done so to make sure that poller can react to a LifeCycle events (e.g., start/stop)
|
||||
and prevent it from potentially spinning in the non-interruptible infinite loop if the implementation of the custom
|
||||
method of the <classname>MessageSource</classname> is not interruptible. In other words when executing stop() method
|
||||
of the poller (e.g., <code>SourcePollingChannelAdapter.stop()</code>) the interrupt signal will be sent to the
|
||||
<classname>TaskExecutor</classname> but if poller is executing method that is not interruptible,
|
||||
the poller will never shut down.
|
||||
and prevent it from potentially spinning in the infinite loop if the implementation of the custom
|
||||
method of the <classname>MessageSource</classname> has a potential to never return null and happened to be non-interruptible.
|
||||
</para>
|
||||
<para>
|
||||
However if you are sure that your method is interruptible and you need the behavior where your want to poll
|
||||
However if you are sure that your method can return null and you need the behavior where you want to poll
|
||||
for as many sources as available per each poll, then you should explicitly set <code>max-messages-per-poll</code>
|
||||
to negative value.
|
||||
<programlisting language="xml"><![CDATA[<poller max-messages-per-poll="-1" fixed-rate="1000"/>]]></programlisting>
|
||||
|
||||
Reference in New Issue
Block a user