Class ServiceBusMessageChannelBinder
java.lang.Object
org.springframework.cloud.stream.binder.AbstractBinder<org.springframework.messaging.MessageChannel,C,P>
org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties>,ServiceBusChannelProvisioner>
com.azure.spring.cloud.stream.binder.servicebus.ServiceBusMessageChannelBinder
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.cloud.stream.binder.Binder<org.springframework.messaging.MessageChannel,
,org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>, org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties>> org.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,
,ServiceBusProducerProperties> org.springframework.cloud.stream.binder.ExtendedPropertiesBinder<org.springframework.messaging.MessageChannel,
,ServiceBusConsumerProperties, ServiceBusProducerProperties> org.springframework.cloud.stream.binder.PollableConsumerBinder<org.springframework.messaging.MessageHandler,
,org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>> org.springframework.context.ApplicationContextAware
,org.springframework.context.ApplicationEventPublisherAware
public class ServiceBusMessageChannelBinder
extends org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties>,ServiceBusChannelProvisioner>
implements org.springframework.cloud.stream.binder.ExtendedPropertiesBinder<org.springframework.messaging.MessageChannel,ServiceBusConsumerProperties,ServiceBusProducerProperties>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder
org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.ErrorInfrastructure, org.springframework.cloud.stream.binder.AbstractMessageChannelBinder.PolledConsumerResources
-
Field Summary
Fields inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder
provisioningProvider
Fields inherited from class org.springframework.cloud.stream.binder.AbstractBinder
logger
-
Constructor Summary
ConstructorDescriptionServiceBusMessageChannelBinder
(String[] headersToEmbed, ServiceBusChannelProvisioner provisioningProvider) Construct aServiceBusMessageChannelBinder
with the specified headersToEmbed andServiceBusChannelProvisioner
. -
Method Summary
Modifier and TypeMethodDescription<T> void
Abandons the message in this context.void
addProcessorFactoryCustomizer
(ServiceBusProcessorFactoryCustomizer processorFactoryCustomizer) Add a processor factory customizer.void
addProducerFactoryCustomizer
(ServiceBusProducerFactoryCustomizer producerFactoryCustomizer) Add a producer factory customizer.protected org.springframework.integration.core.MessageProducer
createConsumerEndpoint
(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties> properties) protected org.springframework.messaging.MessageHandler
createProducerMessageHandler
(org.springframework.cloud.stream.provisioning.ProducerDestination destination, org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties> producerProperties, org.springframework.messaging.MessageChannel errorChannel) <T> void
deadLetter
(String destination, org.springframework.messaging.Message<T> message, String deadLetterReason, String deadLetterErrorDescription) Moves a message to the dead-letter sub-queue with dead-letter reason.protected org.springframework.messaging.MessageHandler
getErrorMessageHandler
(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties> properties) protected org.springframework.integration.support.ErrorMessageStrategy
getExtendedConsumerProperties
(String channelName) getExtendedProducerProperties
(String channelName) Class<? extends org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider>
com.azure.spring.integration.core.instrumentation.InstrumentationManager
Get instrumentation manager.void
setBindingProperties
(ServiceBusExtendedBindingProperties bindingProperties) Set binding properties.void
setMessageConverter
(com.azure.spring.messaging.servicebus.support.converter.ServiceBusMessageConverter messageConverter) Set message converter.void
setNamespaceProperties
(com.azure.spring.messaging.servicebus.core.properties.NamespaceProperties namespaceProperties) Set namespace properties.Methods inherited from class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder
afterUnbindConsumer, afterUnbindProducer, bindPollableConsumer, createPolledConsumerResources, createProducerMessageHandler, doBindConsumer, doBindProducer, errorsBaseName, errorsBaseName, getApplicationEventPublisher, getContainerCustomizer, getDefaultErrorMessageHandler, getErrorBridgeName, getErrorBridgeName, getErrorMessageHandlerName, getErrorRecovererName, getMessageSourceCustomizer, getPolledConsumerErrorMessageHandler, getPolledConsumerRecoveryCallback, onInit, postProcessOutputChannel, postProcessPollableSource, registerErrorInfrastructure, registerErrorInfrastructure, setApplicationEventPublisher, setConsumerEndpointCustomizer, setContainerCustomizer, setProducerMessageHandlerCustomizer, useNativeEncoding
Methods inherited from class org.springframework.cloud.stream.binder.AbstractBinder
afterPropertiesSet, applyPrefix, bindConsumer, bindProducer, buildRetryTemplate, constructDLQName, getApplicationContext, getBeanFactory, getBindingServiceProperties, getEvaluationContext, groupedName, setApplicationContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.cloud.stream.binder.Binder
bindConsumer, bindProducer, getBinderIdentity
Methods inherited from interface org.springframework.cloud.stream.binder.ExtendedBindingProperties
getBindings
-
Constructor Details
-
ServiceBusMessageChannelBinder
public ServiceBusMessageChannelBinder(String[] headersToEmbed, ServiceBusChannelProvisioner provisioningProvider) Construct aServiceBusMessageChannelBinder
with the specified headersToEmbed andServiceBusChannelProvisioner
.- Parameters:
headersToEmbed
- the headers to embedprovisioningProvider
- the provisioning provider
-
-
Method Details
-
createProducerMessageHandler
protected org.springframework.messaging.MessageHandler createProducerMessageHandler(org.springframework.cloud.stream.provisioning.ProducerDestination destination, org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties> producerProperties, org.springframework.messaging.MessageChannel errorChannel) - Specified by:
createProducerMessageHandler
in classorg.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>,
org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties>, ServiceBusChannelProvisioner>
-
createConsumerEndpoint
protected org.springframework.integration.core.MessageProducer createConsumerEndpoint(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties> properties) - Specified by:
createConsumerEndpoint
in classorg.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>,
org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties>, ServiceBusChannelProvisioner>
-
getErrorMessageHandler
protected org.springframework.messaging.MessageHandler getErrorMessageHandler(org.springframework.cloud.stream.provisioning.ConsumerDestination destination, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties> properties) - Overrides:
getErrorMessageHandler
in classorg.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>,
org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties>, ServiceBusChannelProvisioner>
-
deadLetter
public <T> void deadLetter(String destination, org.springframework.messaging.Message<T> message, String deadLetterReason, String deadLetterErrorDescription) Moves a message to the dead-letter sub-queue with dead-letter reason.- Type Parameters:
T
- the type of message payload- Parameters:
destination
- the destinationmessage
- the messagedeadLetterReason
- the dead-letter reasondeadLetterErrorDescription
- the dead-letter error description
-
abandon
Abandons the message in this context.- Type Parameters:
T
- the type of message payload- Parameters:
destination
- the destinationmessage
- the message
-
getExtendedConsumerProperties
- Specified by:
getExtendedConsumerProperties
in interfaceorg.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,
ServiceBusProducerProperties>
-
getExtendedProducerProperties
- Specified by:
getExtendedProducerProperties
in interfaceorg.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,
ServiceBusProducerProperties>
-
getDefaultsPrefix
- Specified by:
getDefaultsPrefix
in interfaceorg.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,
ServiceBusProducerProperties>
-
getExtendedPropertiesEntryClass
public Class<? extends org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider> getExtendedPropertiesEntryClass()- Specified by:
getExtendedPropertiesEntryClass
in interfaceorg.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,
ServiceBusProducerProperties>
-
getErrorMessageStrategy
protected org.springframework.integration.support.ErrorMessageStrategy getErrorMessageStrategy()- Overrides:
getErrorMessageStrategy
in classorg.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>,
org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties>, ServiceBusChannelProvisioner>
-
setBindingProperties
Set binding properties.- Parameters:
bindingProperties
- the binding properties
-
setNamespaceProperties
public void setNamespaceProperties(com.azure.spring.messaging.servicebus.core.properties.NamespaceProperties namespaceProperties) Set namespace properties.- Parameters:
namespaceProperties
- the namespace properties
-
setMessageConverter
public void setMessageConverter(com.azure.spring.messaging.servicebus.support.converter.ServiceBusMessageConverter messageConverter) Set message converter.- Parameters:
messageConverter
- the message converter
-
getInstrumentationManager
public com.azure.spring.integration.core.instrumentation.InstrumentationManager getInstrumentationManager()Get instrumentation manager.- Returns:
- instrumentationManager the instrumentation manager
-
addProducerFactoryCustomizer
public void addProducerFactoryCustomizer(ServiceBusProducerFactoryCustomizer producerFactoryCustomizer) Add a producer factory customizer.- Parameters:
producerFactoryCustomizer
- The producer factory customizer to add.
-
addProcessorFactoryCustomizer
public void addProcessorFactoryCustomizer(ServiceBusProcessorFactoryCustomizer processorFactoryCustomizer) Add a processor factory customizer.- Parameters:
processorFactoryCustomizer
- The processor factory customizer to add.
-