Interface EventHubsProcessorFactory
- All Known Implementing Classes:
DefaultEventHubsNamespaceProcessorFactory
public interface EventHubsProcessorFactory
The strategy to produce
EventProcessorClient
instance.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Called whenever a processor is added or removed. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
Add a listener for this factory.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 anEventProcessorClient
to consume events from the specified event hub in the context of the given consumer group.com.azure.messaging.eventhubs.EventProcessorClient
createProcessor
(String eventHub, String consumerGroup, EventHubsContainerProperties containerProperties) Create anEventProcessorClient
to consume events from the specified event hub in the context of the given consumer group.default boolean
Remove 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 anEventProcessorClient
to 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
- theMessageListener
to 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 anEventProcessorClient
to 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
- theEventHubsContainerProperties
to 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.
-