INT-3177: Generic RedisTemplate for PublishingMH
JIRA: https://jira.springsource.org/browse/INT-3177 * Change `RedisPublishingMessageHandler.StringRedisTemplate` to `RedisTemplate<?, ?>` * Don't provide `serializer` to the `template` * Use `serializer` directly for values which are not `byte[]` * Add `RedisAvailableTests#awaitContainerSubscribed` for tests to avoid race conditions * Refactor some tests * Add test for `byte[]` payload INT-3177: Generic RedisInboundChannelAdapter Port from Spring XD: allow for `RedisInboundChannelAdapter` to receive from Redis any object, not only String * Make `serializer` property 'resettable' to `null` * Change `RedisInboundChannelAdapterParser` to allow to apply empty value from `serializer` attribute * Add parser test and test for `byte[]` messages INT-3177: Polishing and documentation JIRA: https://jira.springsource.org/browse/INT-3033 * Add `topic-expression` to `<int-redis:outbound-channel-adapter>` * Add tests and docs INT-3177: Deprecate `RedisPublishMH.defaultTopic` * Make `topic` and `topic-expression` attributes as mutually exclusive * Polishing Redis Topic Parsers * Polishing tests and docs * Default `serializer` for Redis Topic Adapters is `StringRedisSerializer` for backward compatibility Polishing according PR's discussion INT-3177 Doc Polishing
This commit is contained in:
committed by
Gary Russell
parent
156eeeb738
commit
3470e33069
@@ -152,6 +152,12 @@ rt.setConnectionFactory(redisConnectionFactory);]]></programlisting>
|
||||
|
||||
<para>Inbound adapters can subscribe to multiple topic names hence the comma-delimited set of values in the
|
||||
<code>topics</code> attribute.</para>
|
||||
<para>
|
||||
Inbound adapters can use a <classname>RedisSerializer</classname> to deserialize the body of Redis Messages.
|
||||
The <code>serializer</code> attribute of the <code><int-redis:inbound-channel-adapter></code> can be set to an
|
||||
empty string, which results in a <code>null</code> value for the <classname>RedisSerializer</classname> property.
|
||||
In this case the raw <code>byte[]</code> bodies of Redis Messages are provided as the message payloads.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="redis-outbound-channel-adapter">
|
||||
@@ -178,11 +184,16 @@ rt.setConnectionFactory(redisConnectionFactory);]]></programlisting>
|
||||
a <classname>RedisConnectionFactory</classname> which was defined with '<code>redisConnectionFactory</code>' as its bean name.
|
||||
This example also includes the optional, custom <classname>MessageConverter</classname> (the '<code>testConverter</code>' bean).
|
||||
</para>
|
||||
<para>
|
||||
Since <emphasis>Spring Integration 3.0</emphasis>, the <code><int-redis:outbound-channel-adapter></code>,
|
||||
as an alternative to the <code>topic</code> attribute, has the <code>topic-expression</code> attribute to determine
|
||||
the Redis topic against the Message at runtime. These attributes are mutually exclusive.
|
||||
</para>
|
||||
</section>
|
||||
<section id="redis-queue-inbound-channel-adapter">
|
||||
<title>Redis Queue Inbound Channel Adapter</title>
|
||||
<para>
|
||||
Since <emphasis>Spring Integration 3.0</emphasis>, a Queue Inbound Channel Adapter
|
||||
Since <emphasis>Spring Integration 3.0</emphasis>, a Queue Inbound Channel Adapter
|
||||
is available to 'right pop' messages from a Redis List.
|
||||
The adapter is message-driven using an internal listener thread and does not use a poller.
|
||||
<programlisting language="xml"><![CDATA[<int-redis:queue-inbound-channel-adapter id="" ]]><co id="redis-m-d-c-a-id"/><![CDATA[
|
||||
|
||||
@@ -572,5 +572,23 @@
|
||||
result set respectively. For more information see <xref linkend="jpa"/>.
|
||||
</para>
|
||||
</section>
|
||||
<section id="3.0-redis">
|
||||
<title>Redis Adapters Changers</title>
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
The Redis Inbound Channel Adapter can now use a <code>null</code> value for <code>serializer</code>
|
||||
property, with the raw data being the message payload.
|
||||
</listitem>
|
||||
<listitem>
|
||||
The Redis Outbound Channel Adapter now has the <code>topic-expression</code> property to determine
|
||||
the Redis topic against the Message at runtime.
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
For more information, see <xref linkend="redis"/>.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
Reference in New Issue
Block a user