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

    Constructors
    Constructor
    Description
    ServiceBusMessageChannelBinder(String[] headersToEmbed, ServiceBusChannelProvisioner provisioningProvider)
    Construct a ServiceBusMessageChannelBinder with the specified headersToEmbed and ServiceBusChannelProvisioner.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    abandon(String destination, org.springframework.messaging.Message<T> message)
    Abandons the message in this context.
    void
    Add a processor factory customizer.
    void
    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
     
     
     
    Class<? extends org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider>
     
    com.azure.spring.integration.core.instrumentation.InstrumentationManager
    Get instrumentation manager.
    void
    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

  • 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 class org.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 class org.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 class org.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 destination
      message - the message
      deadLetterReason - the dead-letter reason
      deadLetterErrorDescription - the dead-letter error description
    • abandon

      public <T> void abandon(String destination, org.springframework.messaging.Message<T> message)
      Abandons the message in this context.
      Type Parameters:
      T - the type of message payload
      Parameters:
      destination - the destination
      message - the message
    • getExtendedConsumerProperties

      public ServiceBusConsumerProperties getExtendedConsumerProperties(String channelName)
      Specified by:
      getExtendedConsumerProperties in interface org.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,ServiceBusProducerProperties>
    • getExtendedProducerProperties

      public ServiceBusProducerProperties getExtendedProducerProperties(String channelName)
      Specified by:
      getExtendedProducerProperties in interface org.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,ServiceBusProducerProperties>
    • getDefaultsPrefix

      public String getDefaultsPrefix()
      Specified by:
      getDefaultsPrefix in interface org.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,ServiceBusProducerProperties>
    • getExtendedPropertiesEntryClass

      public Class<? extends org.springframework.cloud.stream.binder.BinderSpecificPropertiesProvider> getExtendedPropertiesEntryClass()
      Specified by:
      getExtendedPropertiesEntryClass in interface org.springframework.cloud.stream.binder.ExtendedBindingProperties<ServiceBusConsumerProperties,ServiceBusProducerProperties>
    • getErrorMessageStrategy

      protected org.springframework.integration.support.ErrorMessageStrategy getErrorMessageStrategy()
      Overrides:
      getErrorMessageStrategy in class org.springframework.cloud.stream.binder.AbstractMessageChannelBinder<org.springframework.cloud.stream.binder.ExtendedConsumerProperties<ServiceBusConsumerProperties>,org.springframework.cloud.stream.binder.ExtendedProducerProperties<ServiceBusProducerProperties>,ServiceBusChannelProvisioner>
    • setBindingProperties

      public void setBindingProperties(ServiceBusExtendedBindingProperties bindingProperties)
      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.