INT-4553: Store-backed QueueChannel improvements

JIRA: https://jira.spring.io/browse/INT-4553
Fixes https://github.com/spring-projects/spring-integration/issues/2628
Fixes https://github.com/spring-projects/spring-integration/issues/2629

- Avoid `size()` calls on the MGS, use `poll()` instead.
- Optimize the indexes for the `INT_CHANNEL_MESSAGE` table.

Avoid size call when no timeout too.

Polishing - PR Comments

Missed a doc fix

Another missed %PREFIX%

Fix underscores

Polishing; PR comments; make MGQ extendable.

Fix version in doc.

* Polishing `@since`
* Use diamonds whenever it is possible

**Cherry-pick to 5.0.x**
This commit is contained in:
Gary Russell
2018-11-16 13:24:36 -05:00
committed by Artem Bilan
parent cfa439d0d4
commit 7135d0603c
16 changed files with 306 additions and 133 deletions

View File

@@ -187,7 +187,7 @@ See the particular vendor documentation for more information.
[[jdbc-outbound-channel-adapter]]
=== Outbound Channel Adapter
The outbound channel adapter is the inverse of the inbound: Its role is to handle a message and use it to execute a SQL query.
The outbound channel adapter is the inverse of the inbound: its role is to handle a message and use it to execute a SQL query.
By default, the message payload and headers are available as input parameters to the query, as the following example shows:
====
@@ -315,7 +315,7 @@ The following example shows the changed configuration:
[source,xml]
----
<int-jdbc:outbound-gateway
update="insert into mything (status, name) values (0, :payload[thing])"
update="insert into mythings (status, name) values (0, :payload[thing])"
request-channel="input" reply-channel="output" data-source="dataSource"
keys-generated="true"/>
----
@@ -378,6 +378,12 @@ The `JdbcChannelMessageStore` implementation provides a more targeted and scalab
Note that you can use a `JdbcMessageStore` to back a message channel, `JdbcChannelMessageStore` is optimized for that purpose.
IMPORTANT: Starting with versions 5.0.11, 5.1.2, the indexes for the `JdbcChannelMessageStore` have been optimized.
If you have large message groups in such a store, you may wish to alter the indexes.
Furthermore, the index for `PriorityChannel` is commented out because it is not needed unless you are using such channels backed by JDBC.
NOTE: When using the `OracleChannelMessageStoreQueryProvider`, the priority channel index **must** be added because it is included in a hint in the query.
==== Initializing the Database
Before starting to use JDBC message store components, you should provision a target database with the appropriate objects.

View File

@@ -150,6 +150,9 @@ A confusing `max-rows-per-poll` property on the JDBC Inbound Channel Adapter and
The `JdbcMessageHandler` supports now a `batchUpdate` functionality when the payload of the request message is an instance of an `Iterable` type.
The indexes for the `INT_CHANNEL_MESSAGE` table (for the `JdbcChannelMessageStore`) have been optimized.
If you have large message groups in such a store, you may wish to alter the indexes.
See <<jdbc>> for more information.
[[x5.1-ftp-sftp]]