public class RedisMessageBus extends MessageBusSupport implements org.springframework.beans.factory.DisposableBean, org.springframework.integration.expression.IntegrationEvaluationContextAware
MessageBus
implementation backed by Redis.MessageBusSupport.PartitioningMetadata, MessageBusSupport.SharedChannelProvider<T extends org.springframework.messaging.MessageChannel>
directChannelProvider, JOB_CHANNEL_TYPE_PREFIX, logger, MEDIATYPES_MEDIATYPE_ALL, ORIGINAL_CONTENT_TYPE_HEADER, P2P_NAMED_CHANNEL_TYPE_PREFIX, PUBSUB_NAMED_CHANNEL_TYPE_PREFIX, pubsubChannelProvider, queueChannelProvider
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.Properties properties)
Bind a message consumer on a p2p channel
|
void |
bindProducer(java.lang.String name,
org.springframework.messaging.MessageChannel moduleOutputChannel,
java.util.Properties properties)
Bind a message producer on a p2p channel.
|
void |
bindPubSubConsumer(java.lang.String name,
org.springframework.messaging.MessageChannel moduleInputChannel,
java.util.Properties properties)
Bind a message consumer on a pub/sub channel
|
void |
bindPubSubProducer(java.lang.String name,
org.springframework.messaging.MessageChannel moduleOutputChannel,
java.util.Properties properties)
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,
java.util.Properties properties)
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,
java.util.Properties properties)
Bind a producer that expects async replies.
|
void |
destroy() |
void |
setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext context) |
addBinding, afterPropertiesSet, bindDynamicProducer, bindDynamicPubSubProducer, deleteBinding, deleteBindings, deserializePayloadIfNecessary, destroyCreatedChannel, determinePartition, getApplicationContext, getBeanFactory, getIdGenerator, isNamedChannel, registerNamedChannelForConsumerIfNecessary, serializePayloadIfNecessary, setApplicationContext, setCodec, setPartitionSelector, setQueueSize, 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
setIntegrationEvaluationContext
in class MessageBusSupport
public void bindConsumer(java.lang.String name, org.springframework.messaging.MessageChannel moduleInputChannel, java.util.Properties properties)
MessageBus
bindConsumer
in interface MessageBus
name
- the logical identity of the message sourcemoduleInputChannel
- the channel bound as a consumerproperties
- arbitrary String key/value pairs that will be used in the bindingpublic void bindPubSubConsumer(java.lang.String name, org.springframework.messaging.MessageChannel moduleInputChannel, java.util.Properties properties)
MessageBus
bindPubSubConsumer
in interface MessageBus
name
- the logical identity of the message sourcemoduleInputChannel
- the channel bound as a pub/sub consumerproperties
- arbitrary String key/value pairs that will be used in the bindingpublic void bindProducer(java.lang.String name, org.springframework.messaging.MessageChannel moduleOutputChannel, java.util.Properties properties)
MessageBus
bindProducer
in interface MessageBus
name
- the logical identity of the message targetmoduleOutputChannel
- the channel bound as a producerproperties
- arbitrary String key/value pairs that will be used in the bindingpublic void bindPubSubProducer(java.lang.String name, org.springframework.messaging.MessageChannel moduleOutputChannel, java.util.Properties properties)
MessageBus
bindPubSubProducer
in interface MessageBus
name
- the logical identity of the message targetmoduleOutputChannel
- the channel bound as a producerproperties
- arbitrary String key/value pairs that will be used in the bindingpublic void bindRequestor(java.lang.String name, org.springframework.messaging.MessageChannel requests, org.springframework.messaging.MessageChannel replies, java.util.Properties properties)
MessageBus
bindRequestor
in interface MessageBus
name
- The name of the requestor.requests
- The request channel - sends requests.replies
- The reply channel - receives replies.properties
- arbitrary String key/value pairs that will be used in the binding.public void bindReplier(java.lang.String name, org.springframework.messaging.MessageChannel requests, org.springframework.messaging.MessageChannel replies, java.util.Properties properties)
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.properties
- arbitrary String key/value pairs that will be used in the binding.public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean