public class RedisMessageBus extends MessageBusSupport implements org.springframework.beans.factory.DisposableBean
MessageBus
implementation backed by Redis.logger, ORIGINAL_CONTENT_TYPE_HEADER
Constructor and Description |
---|
RedisMessageBus(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory,
MultiTypeCodec<java.lang.Object> codec) |
Modifier and Type | Method and Description |
---|---|
void |
bindConsumer(java.lang.String name,
org.springframework.messaging.MessageChannel moduleInputChannel,
java.util.Collection<org.springframework.http.MediaType> acceptedMediaTypes,
boolean aliasHint)
Bind a message consumer on a p2p channel
|
void |
bindProducer(java.lang.String name,
org.springframework.messaging.MessageChannel moduleOutputChannel,
boolean aliasHint)
Bind a message producer on a p2p channel.
|
void |
bindPubSubConsumer(java.lang.String name,
org.springframework.messaging.MessageChannel moduleInputChannel,
java.util.Collection<org.springframework.http.MediaType> acceptedMediaTypes)
Bind a message consumer on a pub/sub channel
|
void |
bindPubSubProducer(java.lang.String name,
org.springframework.messaging.MessageChannel moduleOutputChannel)
Bind a message producer on a pub/sub channel.
|
void |
destroy() |
addBinding, deleteBinding, deleteBindings, setCodec, stopBindings, transformPayloadForConsumerIfNecessary, transformPayloadForProducerIfNecessary, unbindConsumer, unbindConsumers, unbindProducer, unbindProducers
public RedisMessageBus(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, MultiTypeCodec<java.lang.Object> codec)
public void bindConsumer(java.lang.String name, org.springframework.messaging.MessageChannel moduleInputChannel, java.util.Collection<org.springframework.http.MediaType> acceptedMediaTypes, boolean aliasHint)
MessageBus
bindConsumer
in interface MessageBus
name
- the logical identity of the message sourcemoduleInputChannel
- the channel bound as a consumeracceptedMediaTypes
- the media types supported by the channelaliasHint
- whether the provided name represents an alias and thus should support late bindingpublic void bindPubSubConsumer(java.lang.String name, org.springframework.messaging.MessageChannel moduleInputChannel, java.util.Collection<org.springframework.http.MediaType> acceptedMediaTypes)
MessageBus
bindPubSubConsumer
in interface MessageBus
name
- the logical identity of the message sourcemoduleInputChannel
- the channel bound as a pub/sub consumeracceptedMediaTypes
- the media types supported by the channelpublic void bindProducer(java.lang.String name, org.springframework.messaging.MessageChannel moduleOutputChannel, boolean aliasHint)
MessageBus
bindProducer
in interface MessageBus
name
- the logical identity of the message targetmoduleOutputChannel
- the channel bound as a produceraliasHint
- whether the provided name represents an alias and thus should support late bindingpublic void bindPubSubProducer(java.lang.String name, org.springframework.messaging.MessageChannel moduleOutputChannel)
MessageBus
bindPubSubProducer
in interface MessageBus
name
- the logical identity of the message targetmoduleOutputChannel
- the channel bound as a producerpublic void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean