azure-messaging-eventhubs
Loading...
Searching...
No Matches
checkpoint_store_models.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#pragma once
4#include <azure/core/context.hpp>
5#include <azure/core/datetime.hpp>
6#include <azure/core/etag.hpp>
7#include <azure/core/nullable.hpp>
8
9#include <sstream>
10#include <vector>
11
12namespace Azure { namespace Messaging { namespace EventHubs { namespace Models {
13
16 class Ownership final {
17 public:
19 std::string ConsumerGroup;
21 std::string EventHubName;
25 std::string PartitionId{};
27 std::string OwnerId{};
29 Azure::Nullable<Azure::ETag> ETag{};
30
33 Azure::Nullable<Azure::DateTime> LastModifiedTime{};
34
36 std::string GetOwnershipName() const;
37
39 std::string GetOwnershipPrefixName() const;
40 };
41 std::ostream& operator<<(std::ostream& os, Ownership const& value);
42
45 class Checkpoint final {
46 public:
48 std::string ConsumerGroup;
50 std::string EventHubName;
54 std::string PartitionId{};
56 Azure::Nullable<int64_t> Offset{};
58 Azure::Nullable<int64_t> SequenceNumber{};
59
61 std::string GetCheckpointBlobPrefixName() const;
62
64 std::string GetCheckpointBlobName() const;
65 };
66 std::ostream& operator<<(std::ostream& os, Checkpoint const& value);
67}}}} // namespace Azure::Messaging::EventHubs::Models
Checkpoint tracks the last successfully processed event in a partition.
Definition checkpoint_store_models.hpp:45
std::string EventHubName
The event hub name.
Definition checkpoint_store_models.hpp:50
Azure::Nullable< int64_t > SequenceNumber
The sequence number of the last successfully processed event.
Definition checkpoint_store_models.hpp:58
std::string ConsumerGroup
The consumer group name.
Definition checkpoint_store_models.hpp:48
Azure::Nullable< int64_t > Offset
The offset of the last successfully processed event.
Definition checkpoint_store_models.hpp:56
std::string PartitionId
The partition ID for the corresponding checkpoint.
Definition checkpoint_store_models.hpp:54
std::string GetCheckpointBlobName() const
Returns the name of the blob that stores the checkpoint.
Definition checkpoint_store.cpp:51
std::string GetCheckpointBlobPrefixName() const
Returns the prefix for the name of the blob that stores the checkpoint.
Definition checkpoint_store.cpp:37
std::string FullyQualifiedNamespaceName
The fully qualified namespace for the event hub.
Definition checkpoint_store_models.hpp:52
Ownership tracks which consumer owns a particular partition.
Definition checkpoint_store_models.hpp:16
std::string ConsumerGroup
The consumer group name.
Definition checkpoint_store_models.hpp:19
Azure::Nullable< Azure::DateTime > LastModifiedTime
The last modified time for the corresponding ownership. Used to calculate if ownership has expired.
Definition checkpoint_store_models.hpp:33
std::string GetOwnershipName() const
The blob storage name for this ownership.
Definition checkpoint_store.cpp:12
Azure::Nullable< Azure::ETag > ETag
the ETag, used when attempting to claim or update ownership of a partition.
Definition checkpoint_store_models.hpp:29
std::string EventHubName
The event hub name.
Definition checkpoint_store_models.hpp:21
std::string OwnerId
The owner ID for the corresponding ownership.
Definition checkpoint_store_models.hpp:27
std::string PartitionId
The partition ID for the corresponding ownership.
Definition checkpoint_store_models.hpp:25
std::string FullyQualifiedNamespace
The fully qualified namespace for the event hub.
Definition checkpoint_store_models.hpp:23
std::string GetOwnershipPrefixName() const
The blob storage name prefix for this ownership.
Definition checkpoint_store.cpp:23