azure-messaging-eventhubs
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
Azure::Messaging::EventHubs::ProcessorPartitionClient Class Referencefinal

ProcessorPartitionClient allows you to receive events, similar to a [PartitionClient], with a checkpoint store for tracking progress. This type is instantiated from [Processor.NextPartitionClient], which handles load balancing of partition ownership between multiple [Processor] instances. More...

#include <processor_partition_client.hpp>

Public Member Functions

 ProcessorPartitionClient (ProcessorPartitionClient const &other)=delete
 Copy a ProcessorPartitionClient to another ProcessorPartitionClient.
 
 ProcessorPartitionClient (ProcessorPartitionClient &&other)=default
 Move a ProcessorPartitionClient to another.
 
ProcessorPartitionClientoperator= (ProcessorPartitionClient const &other)=delete
 Assignment operator.
 
ProcessorPartitionClientoperator= (ProcessorPartitionClient &&other)=default
 Move a ProcessorPartitionClient to another.
 
std::vector< std::shared_ptr< const Models::ReceivedEventData > > ReceiveEvents (uint32_t maxBatchSize, Core::Context const &context={})
 
void UpdateCheckpoint (std::shared_ptr< const Models::ReceivedEventData > const &eventData, Core::Context const &context={})
 Updates the checkpoint for this partition using the given event data.
 
std::string PartitionId () const
 Returns the partition ID associated with this ProcessorPartitionClient.
 
void Close (Core::Context const &context={})
 Closes the partition client.
 

Friends

class Processor
 

Detailed Description

Remarks
If you do NOT want to use dynamic load balancing, and would prefer to track state and ownership manually, use the [ConsumerClient] instead.

Member Function Documentation

◆ Close()

void Azure::Messaging::EventHubs::ProcessorPartitionClient::Close ( Core::Context const &  context = {})
inline
Parameters
contextThe context to pass to the close operation.

◆ ReceiveEvents()

std::vector< std::shared_ptr< const Models::ReceivedEventData > > Azure::Messaging::EventHubs::ProcessorPartitionClient::ReceiveEvents ( uint32_t  maxBatchSize,
Core::Context const &  context = {} 
)
inline

Receives Events from the partition.

Parameters
maxBatchSizeThe maximum number of events to receive in a single call to the service.
contextThe context to pass to the update checkpoint operation.

◆ UpdateCheckpoint()

void Azure::Messaging::EventHubs::ProcessorPartitionClient::UpdateCheckpoint ( std::shared_ptr< const Models::ReceivedEventData > const &  eventData,
Core::Context const &  context = {} 
)

Subsequent partition client reads will start from this event.

Parameters
eventDataThe event data to use for updating the checkpoint.
contextThe context to pass to the update checkpoint operation.

The documentation for this class was generated from the following files: