INT-3520: Add Reactor's PersistentQueue Support
JIRA: https://jira.spring.io/browse/INT-3520 INT-3520: Use `Condition` to wait items in the `Queue` INT-3520: Reworking to the `Semaphore(0)` * Implement 'artificial infinite wait' * Add distributed test with infinite `receive()` INT-3520: Correct usage of `Semaphore` Minor Doc Polishing
This commit is contained in:
committed by
Gary Russell
parent
a3d8776b5c
commit
5f9b04949e
@@ -557,9 +557,9 @@ payload to an Integer.
|
||||
is polled from a <classname>QueueChannel</classname>, it is removed from the Message Store.
|
||||
</para>
|
||||
<para>
|
||||
By default any <classname>QueueChannel</classname> only stores its Messages in an in-memory Queue
|
||||
By default, a <classname>QueueChannel</classname> stores its Messages in an in-memory Queue
|
||||
and can therefore lead to the lost message scenario mentioned above. However Spring Integration
|
||||
provides a <classname>JdbcMessageStore</classname> to allow a <classname>QueueChannel</classname> to be backed by an RDBMS.
|
||||
provides persistent stores, such as the <classname>JdbcMessageStore</classname>.
|
||||
</para>
|
||||
<para>
|
||||
You can configure a Message Store for any <classname>QueueChannel</classname> by adding the
|
||||
@@ -593,6 +593,21 @@ payload to an Integer.
|
||||
is a <interfacename>ChannelPriorityMessageStore</interfacename> the messages will be received in
|
||||
FIFO within priority order. The notion of priority is determined by the message store implementation.
|
||||
</para>
|
||||
<para>
|
||||
Another option to customize the QueueChannel environment is provided by the <code>ref</code> attribute of the
|
||||
<code><int:queue></code> sub-element. This attribute implies the reference to any
|
||||
<interfacename>java.util.Queue</interfacename> implementation. An implementation is provided
|
||||
by the <ulink url="https://github.com/reactor/reactor">Project Reactor</ulink> and its
|
||||
<classname>reactor.queue.PersistentQueue</classname> implementation for the
|
||||
<ulink url="https://github.com/OpenHFT/Chronicle-Queue">IndexedChronicle</ulink>:
|
||||
</para>
|
||||
<programlisting language="java"><![CDATA[@Bean
|
||||
public QueueChannel reactorQueue() {
|
||||
return new QueueChannel(new PersistentQueueSpec<Message<?>>()
|
||||
.codec(new JavaSerializationCodec<Message<?>>())
|
||||
.basePath(System.getProperty("java.io.tmpdir") + "/reactor-queue")
|
||||
.get());
|
||||
}]]></programlisting>
|
||||
</section>
|
||||
|
||||
<section id="channel-configuration-pubsubchannel">
|
||||
|
||||
@@ -237,5 +237,16 @@
|
||||
See <xref linkend="service-activator-namespace"/>.
|
||||
</para>
|
||||
</section>
|
||||
<section id="4.1-queue-channel-queue.typ">
|
||||
<title>QueueChannel: backed Queue type</title>
|
||||
<para>
|
||||
The <classname>QueueChannel</classname> backed <classname>Queue type</classname> has been changed
|
||||
from <interfacename>BlockingQueue</interfacename> to the more generic
|
||||
<interfacename>Queue</interfacename>. It allows the use of any external
|
||||
<interfacename>Queue</interfacename> implementation, for example Reactor's
|
||||
<classname>PersistentQueue</classname>.
|
||||
See <xref linkend="channel-configuration-queuechannel"/>.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
Reference in New Issue
Block a user