Interface EventHubsProcessorFactory
- All Known Implementing Classes:
DefaultEventHubsNamespaceProcessorFactory
public interface EventHubsProcessorFactory
The strategy to produce
EventProcessorClient instance.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCalled whenever a processor is added or removed. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidAdd a listener for this factory.com.azure.messaging.eventhubs.EventProcessorClientcreateProcessor(String eventHub, String consumerGroup, com.azure.spring.cloud.service.listener.MessageListener<?> listener, com.azure.spring.cloud.service.eventhubs.consumer.EventHubsErrorHandler errorHandler) Create anEventProcessorClientto consume events from the specified event hub in the context of the given consumer group.com.azure.messaging.eventhubs.EventProcessorClientcreateProcessor(String eventHub, String consumerGroup, EventHubsContainerProperties containerProperties) Create anEventProcessorClientto consume events from the specified event hub in the context of the given consumer group.default booleanRemove a listener from this factory.
-
Method Details
-
createProcessor
com.azure.messaging.eventhubs.EventProcessorClient createProcessor(String eventHub, String consumerGroup, com.azure.spring.cloud.service.listener.MessageListener<?> listener, com.azure.spring.cloud.service.eventhubs.consumer.EventHubsErrorHandler errorHandler) Create anEventProcessorClientto consume events from the specified event hub in the context of the given consumer group.- Parameters:
eventHub- the event hub to consume events from.consumerGroup- the consumer group.listener- theMessageListenerto consume events with.errorHandler- the error handler to handle the errors.- Returns:
- the processor client.
-
createProcessor
com.azure.messaging.eventhubs.EventProcessorClient createProcessor(String eventHub, String consumerGroup, EventHubsContainerProperties containerProperties) Create anEventProcessorClientto consume events from the specified event hub in the context of the given consumer group.- Parameters:
eventHub- the event hub to consume events from.consumerGroup- the consumer group.containerProperties- theEventHubsContainerPropertiesto describe the processor.- Returns:
- the processor client.
-
addListener
Add a listener for this factory.- Parameters:
listener- the listener.
-
removeListener
Remove a listener from this factory.- Parameters:
listener- the listener.- Returns:
- true if removed.
-