Interface ServiceBusProducerFactory

All Known Implementing Classes:
DefaultServiceBusNamespaceProducerFactory

public interface ServiceBusProducerFactory
The strategy to produce ServiceBusSenderAsyncClient instance.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Called whenever a producer is added or removed.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Add a listener for this factory.
    com.azure.messaging.servicebus.ServiceBusSenderAsyncClient
    Create ServiceBusSenderAsyncClient to send events to the Service Bus queue/topic entity.
    com.azure.messaging.servicebus.ServiceBusSenderAsyncClient
    createProducer(String name, com.azure.spring.cloud.service.servicebus.properties.ServiceBusEntityType entityType)
    Create ServiceBusSenderAsyncClient to send events to the Service Bus queue/topic entity with explicit ServiceBusEntityType.
    default boolean
    Remove a listener
  • Method Details

    • createProducer

      com.azure.messaging.servicebus.ServiceBusSenderAsyncClient createProducer(String name)
      Create ServiceBusSenderAsyncClient to send events to the Service Bus queue/topic entity.
      Parameters:
      name - the destination entity name
      Returns:
      the producer.
    • createProducer

      com.azure.messaging.servicebus.ServiceBusSenderAsyncClient createProducer(String name, com.azure.spring.cloud.service.servicebus.properties.ServiceBusEntityType entityType)
      Create ServiceBusSenderAsyncClient to send events to the Service Bus queue/topic entity with explicit ServiceBusEntityType.
      Parameters:
      name - the destination entity name.
      entityType - the Service Bus entity type.
      Returns:
      the producer.
    • addListener

      default void addListener(ServiceBusProducerFactory.Listener listener)
      Add a listener for this factory.
      Parameters:
      listener - the listener
    • removeListener

      default boolean removeListener(ServiceBusProducerFactory.Listener listener)
      Remove a listener
      Parameters:
      listener - the listener
      Returns:
      true if removed.