Interface EventHubsProcessorFactory

All Known Implementing Classes:
DefaultEventHubsNamespaceProcessorFactory

public interface EventHubsProcessorFactory
The strategy to produce EventProcessorClient instance.
  • Nested Class Summary

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

    Modifier and Type
    Method
    Description
    default 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 an EventProcessorClient 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 an EventProcessorClient 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 an EventProcessorClient 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 - the MessageListener 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 an EventProcessorClient 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 - the EventHubsContainerProperties to describe the processor.
      Returns:
      the processor client.
    • addListener

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

      default boolean removeListener(EventHubsProcessorFactory.Listener listener)
      Remove a listener from this factory.
      Parameters:
      listener - the listener.
      Returns:
      true if removed.