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

ProducerClient can be used to send events to an Event Hub.

#include <producer_client.hpp>

Public Member Functions

std::string const & GetEventHubName ()
 
Azure::Core::Http::Policies::RetryOptions const & GetRetryOptions ()
 
 ProducerClient (ProducerClient const &other)=default
 
ProducerClientoperator= (ProducerClient const &other)=default
 
 ProducerClient ()=default
 
 ProducerClient (std::string const &connectionString, std::string const &eventHub, ProducerClientOptions options={})
 Constructs a new ProducerClient instance.
 
 ProducerClient (std::string const &fullyQualifiedNamespace, std::string const &eventHub, std::shared_ptr< Azure::Core::Credentials::TokenCredential > credential, ProducerClientOptions options={})
 Constructs a new ProducerClient instance.
 
bool SendEventDataBatch (EventDataBatch const &eventDataBatch, Core::Context const &context={})
 Proceeds to send and EventDataBatch.
 
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.
 

Constructor & Destructor Documentation

◆ ProducerClient() [1/4]

Azure::Messaging::EventHubs::ProducerClient::ProducerClient ( ProducerClient const &  other)
default

Create a ProducerClient from another ProducerClient.

◆ ProducerClient() [2/4]

Azure::Messaging::EventHubs::ProducerClient::ProducerClient ( )
default

Default Constructor for a ProducerClient

◆ ProducerClient() [3/4]

Azure::Messaging::EventHubs::ProducerClient::ProducerClient ( std::string const &  connectionString,
std::string const &  eventHub,
ProducerClientOptions  options = {} 
)
Parameters
connectionStringEvent hubs connection string
eventHubEvent hub name
optionsAdditional options for creating the client

◆ ProducerClient() [4/4]

Azure::Messaging::EventHubs::ProducerClient::ProducerClient ( std::string const &  fullyQualifiedNamespace,
std::string const &  eventHub,
std::shared_ptr< Azure::Core::Credentials::TokenCredential >  credential,
ProducerClientOptions  options = {} 
)
Parameters
fullyQualifiedNamespaceFully qualified namespace name
eventHubEvent hub name
credentialCredential to use for authentication
optionsAdditional options for creating the client

Member Function Documentation

◆ GetEventHubName()

std::string const & Azure::Messaging::EventHubs::ProducerClient::GetEventHubName ( )
inline

Get the fully qualified namespace from the connection string

◆ GetEventHubProperties()

Azure::Messaging::EventHubs::Models::EventHubProperties Azure::Messaging::EventHubs::ProducerClient::GetEventHubProperties ( Core::Context const &  context = {})
Parameters
contextContext for the operation can be used for request cancellation.

◆ GetPartitionProperties()

Azure::Messaging::EventHubs::Models::EventHubPartitionProperties Azure::Messaging::EventHubs::ProducerClient::GetPartitionProperties ( std::string const &  partitionID,
Core::Context const &  context = {} 
)
Parameters
partitionIDpartition ID to detail.
contextContext for the operation can be used for request cancellation.

◆ GetRetryOptions()

Azure::Core::Http::Policies::RetryOptions const & Azure::Messaging::EventHubs::ProducerClient::GetRetryOptions ( )
inline

Get Retry options for this ProducerClient

◆ operator=()

ProducerClient & Azure::Messaging::EventHubs::ProducerClient::operator= ( ProducerClient const &  other)
default

Assign a ProducerClient another ProducerClient.

◆ SendEventDataBatch()

bool Azure::Messaging::EventHubs::ProducerClient::SendEventDataBatch ( EventDataBatch const &  eventDataBatch,
Core::Context const &  context = {} 
)
Parameters
eventDataBatchBatch to send
contextRequest context

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