Interface ServiceBusProducerFactory
- All Known Implementing Classes:
DefaultServiceBusNamespaceProducerFactory
public interface ServiceBusProducerFactory
The strategy to produce
ServiceBusSenderAsyncClient instance.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCalled whenever a producer is added or removed. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidAdd a listener for this factory.com.azure.messaging.servicebus.ServiceBusSenderAsyncClientcreateProducer(String name) CreateServiceBusSenderAsyncClientto send events to the Service Bus queue/topic entity.com.azure.messaging.servicebus.ServiceBusSenderAsyncClientcreateProducer(String name, com.azure.spring.cloud.service.servicebus.properties.ServiceBusEntityType entityType) CreateServiceBusSenderAsyncClientto send events to the Service Bus queue/topic entity with explicitServiceBusEntityType.default booleanRemove a listener
-
Method Details
-
createProducer
CreateServiceBusSenderAsyncClientto 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) CreateServiceBusSenderAsyncClientto send events to the Service Bus queue/topic entity with explicitServiceBusEntityType.- Parameters:
name- the destination entity name.entityType- the Service Bus entity type.- Returns:
- the producer.
-
addListener
Add a listener for this factory.- Parameters:
listener- the listener
-
removeListener
Remove a listener- Parameters:
listener- the listener- Returns:
- true if removed.
-