The ConsumerClient class is a high level class used to consume events from an Event Hub.
More...
#include <consumer_client.hpp>
|
| ConsumerClient (ConsumerClient const &other)=delete |
|
| ConsumerClient (ConsumerClient &&other)=delete |
|
ConsumerClient & | operator= (ConsumerClient const &other)=delete |
|
ConsumerClient & | operator= (ConsumerClient &&other)=delete |
|
std::string const & | GetEventHubName () const |
| Getter for event hub name.
|
|
std::string const & | GetConsumerGroup () const |
| Getter for consumer group name.
|
|
Models::ConsumerClientDetails | GetDetails () const |
| Getter for client details.
|
|
Azure::Core::Http::Policies::RetryOptions const & | GetRetryOptions () const |
| Getter for retry options.
|
|
| ConsumerClient (std::string const &connectionString, std::string const &eventHub={}, std::string const &consumerGroup=DefaultConsumerGroup, ConsumerClientOptions const &options={}) |
| creates a ConsumerClient from a connection string.
|
|
| ConsumerClient (std::string const &fullyQualifiedNamespace, std::string const &eventHub, std::shared_ptr< Azure::Core::Credentials::TokenCredential > credential, std::string const &consumerGroup=DefaultConsumerGroup, ConsumerClientOptions const &options={}) |
| creates a ConsumerClient from a token credential.
|
|
PartitionClient | CreatePartitionClient (std::string const &partitionId, PartitionClientOptions const &options={}, Azure::Core::Context const &context={}) |
| Create new Partition client.
|
|
void | Close (Azure::Core::Context const &context) |
| Closes the consumer client canceling any operations outstanding on any of the existing partition clients.
|
|
Models::EventHubProperties | GetEventHubProperties (Core::Context const &context={}) |
| GetEventHubProperties gets properties of an eventHub. This includes data like name, and partitions.
|
|
Models::EventHubPartitionProperties | GetPartitionProperties (std::string const &partitionID, Core::Context const &context={}) |
| GetPartitionProperties gets properties for a specific partition. This includes data like the last enqueued sequence number, the first sequence number and when an event was last enqueued to the partition.
|
|
The ConsumerClient class uses a Azure::Messaging::EventHubs::PartitionClient to receive events from a specific partition of an Event Hub. The Azure::Messaging::EventHubs::PartitionClient is created by the ConsumerClient and is available via the NewPartitionClient method. The ConsumerClient is also responsible for managing the connection to the Event Hub and will reconnect as necessary.
◆ ConsumerClient() [1/4]
Azure::Messaging::EventHubs::ConsumerClient::ConsumerClient |
( |
ConsumerClient const & |
other | ) |
|
|
delete |
◆ ConsumerClient() [2/4]
Azure::Messaging::EventHubs::ConsumerClient::ConsumerClient |
( |
ConsumerClient && |
other | ) |
|
|
delete |
◆ ConsumerClient() [3/4]
Azure::Messaging::EventHubs::ConsumerClient::ConsumerClient |
( |
std::string const & |
connectionString, |
|
|
std::string const & |
eventHub = {} , |
|
|
std::string const & |
consumerGroup = DefaultConsumerGroup , |
|
|
ConsumerClientOptions const & |
options = {} |
|
) |
| |
- Parameters
-
connectionString | connection string to resource |
eventHub | event hub name |
consumerGroup | consumer group name |
options | client options |
◆ ConsumerClient() [4/4]
Azure::Messaging::EventHubs::ConsumerClient::ConsumerClient |
( |
std::string const & |
fullyQualifiedNamespace, |
|
|
std::string const & |
eventHub, |
|
|
std::shared_ptr< Azure::Core::Credentials::TokenCredential > |
credential, |
|
|
std::string const & |
consumerGroup = DefaultConsumerGroup , |
|
|
ConsumerClientOptions const & |
options = {} |
|
) |
| |
- Parameters
-
fullyQualifiedNamespace | fully qualified namespace name (e.g. myeventhub.servicebus.windows.net) |
eventHub | event hub name |
consumerGroup | consumer group name |
credential | Token credential |
options | client options |
◆ Close()
void Azure::Messaging::EventHubs::ConsumerClient::Close |
( |
Azure::Core::Context const & |
context | ) |
|
- Parameters
-
context | The context for the operation can be used for request cancellation. |
◆ CreatePartitionClient()
PartitionClient Azure::Messaging::EventHubs::ConsumerClient::CreatePartitionClient |
( |
std::string const & |
partitionId, |
|
|
PartitionClientOptions const & |
options = {} , |
|
|
Azure::Core::Context const & |
context = {} |
|
) |
| |
- Parameters
-
partitionId | targeted partition |
options | client options |
context | The context for the operation can be used for request cancellation. |
◆ GetConsumerGroup()
std::string const & Azure::Messaging::EventHubs::ConsumerClient::GetConsumerGroup |
( |
| ) |
const |
|
inline |
- Returns
- Consumer group name for client
◆ GetDetails()
- Returns
- Client details for client
◆ GetEventHubName()
std::string const & Azure::Messaging::EventHubs::ConsumerClient::GetEventHubName |
( |
| ) |
const |
|
inline |
- Returns
- Event hub name for client
◆ GetEventHubProperties()
Models::EventHubProperties Azure::Messaging::EventHubs::ConsumerClient::GetEventHubProperties |
( |
Core::Context const & |
context = {} | ) |
|
◆ GetPartitionProperties()
Models::EventHubPartitionProperties Azure::Messaging::EventHubs::ConsumerClient::GetPartitionProperties |
( |
std::string const & |
partitionID, |
|
|
Core::Context const & |
context = {} |
|
) |
| |
- Parameters
-
partitionID | partition ID to detail. |
context | The context for the operation can be used for request cancellation. |
◆ GetRetryOptions()
Azure::Core::Http::Policies::RetryOptions const & Azure::Messaging::EventHubs::ConsumerClient::GetRetryOptions |
( |
| ) |
const |
|
inline |
- Returns
- Retry options for client
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following files: