ProducerClient can be used to send events to an Event Hub.
#include <producer_client.hpp>
|
std::string const & | GetEventHubName () |
|
Azure::Core::Http::Policies::RetryOptions const & | GetRetryOptions () const |
|
| ProducerClient (ProducerClient const &other)=delete |
|
ProducerClient & | operator= (ProducerClient const &other)=delete |
|
| ProducerClient (ProducerClient &&other)=delete |
|
ProducerClient & | operator= (ProducerClient &&other)=delete |
|
| 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.
|
|
void | Close (Azure::Core::Context const &context={}) |
| Close all the connections and sessions.
|
|
EventDataBatch | CreateBatch (EventDataBatchOptions const &options={}, Azure::Core::Context const &context={}) |
| Create a new EventDataBatch to be sent to the Event Hub.
|
|
void | Send (EventDataBatch const &eventDataBatch, Core::Context const &context={}) |
| Send an EventDataBatch to the remote Event Hub.
|
|
void | Send (Models::EventData const &eventData, Core::Context const &context={}) |
| Send an EventData to the remote Event Hub.
|
|
void | Send (std::vector< Models::EventData > const &eventData, Core::Context const &context={}) |
| Send a vector of EventData items to the remote Event Hub.
|
|
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.
|
|
◆ ProducerClient() [1/4]
Azure::Messaging::EventHubs::ProducerClient::ProducerClient |
( |
ProducerClient const & |
other | ) |
|
|
delete |
◆ ProducerClient() [2/4]
Azure::Messaging::EventHubs::ProducerClient::ProducerClient |
( |
| ) |
|
|
default |
◆ ProducerClient() [3/4]
Azure::Messaging::EventHubs::ProducerClient::ProducerClient |
( |
std::string const & |
connectionString, |
|
|
std::string const & |
eventHub, |
|
|
ProducerClientOptions |
options = {} |
|
) |
| |
- Parameters
-
connectionString | Event hubs connection string |
eventHub | Event hub name |
options | Additional 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
-
fullyQualifiedNamespace | Fully qualified namespace name |
eventHub | Event hub name |
credential | Credential to use for authentication |
options | Additional options for creating the client |
◆ Close()
void Azure::Messaging::EventHubs::ProducerClient::Close |
( |
Azure::Core::Context const & |
context = {} | ) |
|
|
inline |
- Parameters
-
context | Context for the operation can be used for request cancellation. |
◆ CreateBatch()
- Parameters
-
options | Optional batch options |
context | Context for the operation can be used for request cancellation. |
- Returns
- newly created EventDataBatch object.
◆ GetEventHubName()
std::string const & Azure::Messaging::EventHubs::ProducerClient::GetEventHubName |
( |
| ) |
|
|
inline |
Get the fully qualified namespace from the connection string
◆ GetEventHubProperties()
Models::EventHubProperties Azure::Messaging::EventHubs::ProducerClient::GetEventHubProperties |
( |
Core::Context const & |
context = {} | ) |
|
- Parameters
-
context | Context for the operation can be used for request cancellation. |
◆ GetPartitionProperties()
Models::EventHubPartitionProperties Azure::Messaging::EventHubs::ProducerClient::GetPartitionProperties |
( |
std::string const & |
partitionID, |
|
|
Core::Context const & |
context = {} |
|
) |
| |
- Parameters
-
partitionID | partition ID to detail. |
context | Context for the operation can be used for request cancellation. |
◆ GetRetryOptions()
Azure::Core::Http::Policies::RetryOptions const & Azure::Messaging::EventHubs::ProducerClient::GetRetryOptions |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ Send() [1/3]
void Azure::Messaging::EventHubs::ProducerClient::Send |
( |
EventDataBatch const & |
eventDataBatch, |
|
|
Core::Context const & |
context = {} |
|
) |
| |
- Parameters
-
eventDataBatch | Batch to send |
context | Request context |
◆ Send() [2/3]
void Azure::Messaging::EventHubs::ProducerClient::Send |
( |
Models::EventData const & |
eventData, |
|
|
Core::Context const & |
context = {} |
|
) |
| |
- Parameters
-
eventData | event to send |
context | Request context |
◆ Send() [3/3]
void Azure::Messaging::EventHubs::ProducerClient::Send |
( |
std::vector< Models::EventData > const & |
eventData, |
|
|
Core::Context const & |
context = {} |
|
) |
| |
- Parameters
-
eventData | events to send |
context | Request context |
The documentation for this class was generated from the following files: