public class RedisMessageBus extends MessageBusSupport implements org.springframework.beans.factory.DisposableBean, org.springframework.integration.expression.IntegrationEvaluationContextAware
MessageBus
implementation backed by Redis.logger, MEDIATYPES_MEDIATYPE_ALL, 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,
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)
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 |
bindReplier(java.lang.String name,
org.springframework.messaging.MessageChannel requests,
org.springframework.messaging.MessageChannel replies)
Bind a consumer that handles requests from a requestor and asynchronously sends replies.
|
void |
bindRequestor(java.lang.String name,
org.springframework.messaging.MessageChannel requests,
org.springframework.messaging.MessageChannel replies)
Bind a producer that expects async replies.
|
void |
destroy() |
void |
setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext context) |
addBinding, deleteBinding, deleteBindings, deserializePayloadIfNecessary, getBeanFactory, getIdGenerator, serializePayloadIfNecessary, setBeanFactory, setCodec, stopBindings, unbindConsumer, unbindConsumers, unbindProducer, unbindProducers
public RedisMessageBus(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory, MultiTypeCodec<java.lang.Object> codec)
public void setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext context)
setIntegrationEvaluationContext
in interface org.springframework.integration.expression.IntegrationEvaluationContextAware
public void bindConsumer(java.lang.String name, org.springframework.messaging.MessageChannel moduleInputChannel, boolean aliasHint)
MessageBus
bindConsumer
in interface MessageBus
name
- the logical identity of the message sourcemoduleInputChannel
- the channel bound as a consumeraliasHint
- whether the provided name represents an alias and thus should support late bindingpublic void bindPubSubConsumer(java.lang.String name, org.springframework.messaging.MessageChannel moduleInputChannel)
MessageBus
bindPubSubConsumer
in interface MessageBus
name
- the logical identity of the message sourcemoduleInputChannel
- the channel bound as a pub/sub consumerpublic 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 bindRequestor(java.lang.String name, org.springframework.messaging.MessageChannel requests, org.springframework.messaging.MessageChannel replies)
MessageBus
bindRequestor
in interface MessageBus
name
- The name of the requestor.requests
- The request channel - sends requests.replies
- The reply channel - receives replies.public void bindReplier(java.lang.String name, org.springframework.messaging.MessageChannel requests, org.springframework.messaging.MessageChannel replies)
MessageBus
bindReplier
in interface MessageBus
name
- The name of the requestor for which this replier will handle requests.requests
- The request channel - receives requests.replies
- The reply channel - sends replies.public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean