diff --git a/docs/src/reference/docbook/channel.xml b/docs/src/reference/docbook/channel.xml index 4b25c876c4..cc0a36e1db 100644 --- a/docs/src/reference/docbook/channel.xml +++ b/docs/src/reference/docbook/channel.xml @@ -418,6 +418,8 @@ public Message receive(final PollableChannel channel) { ... }]]> + +
QueueChannel Configuration @@ -432,7 +434,62 @@ public Message receive(final PollableChannel channel) { ... }]]> + + Persistent QueueChannel Configuration + + + Since QueueChannel provides capability to buffer Messages it also introduces a point of failure + where Messages could be lost in the event of the system crash. To mitigate this risk, QueueChannel is + backed by a persistent store which is exposed via simple strategy interface MessageStore: + getMessage(UUID id); + + Message addMessage(Message message); + + Message removeMessage(UUID id); + + int getMessageCount(); +}]]> + For more details on MessageStore see . + + + When QueueChannel receives the Message it will add the Message to the MessageStore + by invoking addMessage(Message) method and when the Message is polled from the MessageStore + it is removed from it via removeMessage(UUID) method. + + + By default any QueueChannel is bootstrapped with SimpleMessageStore which is + in-memory Map-based implementation of the MessageStore interface. However Spring Integration + also provides JdbcMessageStore to allow QueueChannel to be backed by an RDBMS. + + + You configure MessageStore for QueueChannel via message-store attribute. + + + + + + + +]]> + + You can also see that you can configure JdbcMessageStore via namespace support provided by + Spring Integration JDBC module. All you need to do is inject any standard Spring datasource. Spring Integration JDBC + module also provides schemas for most popular databases. These schemas are located in + org.springframework.integration.jdbc package of Spring Integration JDBC module. + + + One thing to remember is that with any transactional persistent store (e.g., JdbcMessageStore) + the messages removed from such persistent store will only be completely removed if transaction completed + successfully, otherwise transaction will roll back and the Message will not be lost. + + And of course you can alway provide your own implementation of MessageStore interface +
+ + +
PublishSubscribeChannel Configuration diff --git a/docs/src/reference/docbook/jdbc.xml b/docs/src/reference/docbook/jdbc.xml index db4df2df69..897b04cbbb 100644 --- a/docs/src/reference/docbook/jdbc.xml +++ b/docs/src/reference/docbook/jdbc.xml @@ -158,7 +158,7 @@ binding of the incoming message to the query.
-
+
Message Store The JDBC module provides an implementation of the Spring Integration