@azure/eventhubs-checkpointstore-blob 1.1.0-beta.1 → 2.0.0-alpha.20250129.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +10 -9
  2. package/{typings/eventhubs-checkpointstore-blob.d.ts → dist/browser/blobCheckpointStore.d.ts} +68 -124
  3. package/dist/browser/blobCheckpointStore.d.ts.map +1 -0
  4. package/{dist-esm/src → dist/browser}/blobCheckpointStore.js +6 -6
  5. package/dist/browser/blobCheckpointStore.js.map +1 -0
  6. package/dist/browser/index.d.ts +4 -0
  7. package/dist/browser/index.d.ts.map +1 -0
  8. package/dist/browser/index.js +5 -0
  9. package/dist/browser/index.js.map +1 -0
  10. package/dist/browser/log.d.ts +12 -0
  11. package/dist/browser/log.d.ts.map +1 -0
  12. package/{dist-esm/src → dist/browser}/log.js +1 -1
  13. package/{dist-esm/src → dist/browser}/log.js.map +1 -1
  14. package/dist/browser/package.json +3 -0
  15. package/dist/browser/storageBlobInterfaces.d.ts +39 -0
  16. package/dist/browser/storageBlobInterfaces.d.ts.map +1 -0
  17. package/dist/browser/storageBlobInterfaces.js +4 -0
  18. package/dist/browser/storageBlobInterfaces.js.map +1 -0
  19. package/dist/browser/util/error.d.ts +9 -0
  20. package/dist/browser/util/error.d.ts.map +1 -0
  21. package/{dist-esm/src → dist/browser}/util/error.js +2 -2
  22. package/dist/browser/util/error.js.map +1 -0
  23. package/dist/commonjs/blobCheckpointStore.d.ts +68 -0
  24. package/dist/commonjs/blobCheckpointStore.d.ts.map +1 -0
  25. package/dist/commonjs/blobCheckpointStore.js +293 -0
  26. package/dist/commonjs/blobCheckpointStore.js.map +1 -0
  27. package/dist/commonjs/index.d.ts +4 -0
  28. package/dist/commonjs/index.d.ts.map +1 -0
  29. package/dist/commonjs/index.js +10 -0
  30. package/dist/commonjs/index.js.map +1 -0
  31. package/dist/commonjs/log.d.ts +12 -0
  32. package/dist/commonjs/log.d.ts.map +1 -0
  33. package/dist/commonjs/log.js +23 -0
  34. package/dist/commonjs/log.js.map +1 -0
  35. package/dist/commonjs/package.json +3 -0
  36. package/dist/commonjs/storageBlobInterfaces.d.ts +39 -0
  37. package/dist/commonjs/storageBlobInterfaces.d.ts.map +1 -0
  38. package/dist/commonjs/storageBlobInterfaces.js +5 -0
  39. package/dist/commonjs/storageBlobInterfaces.js.map +1 -0
  40. package/dist/commonjs/tsdoc-metadata.json +11 -0
  41. package/dist/commonjs/util/error.d.ts +9 -0
  42. package/dist/commonjs/util/error.d.ts.map +1 -0
  43. package/dist/commonjs/util/error.js +22 -0
  44. package/dist/commonjs/util/error.js.map +1 -0
  45. package/dist/esm/blobCheckpointStore.d.ts +68 -0
  46. package/dist/esm/blobCheckpointStore.d.ts.map +1 -0
  47. package/dist/{index.js → esm/blobCheckpointStore.js} +12 -55
  48. package/dist/esm/blobCheckpointStore.js.map +1 -0
  49. package/dist/esm/index.d.ts +4 -0
  50. package/dist/esm/index.d.ts.map +1 -0
  51. package/dist/esm/index.js +5 -0
  52. package/dist/esm/index.js.map +1 -0
  53. package/dist/esm/log.d.ts +12 -0
  54. package/dist/esm/log.d.ts.map +1 -0
  55. package/dist/esm/log.js +19 -0
  56. package/dist/esm/log.js.map +1 -0
  57. package/dist/esm/package.json +3 -0
  58. package/dist/esm/storageBlobInterfaces.d.ts +39 -0
  59. package/dist/esm/storageBlobInterfaces.d.ts.map +1 -0
  60. package/dist/esm/storageBlobInterfaces.js +4 -0
  61. package/dist/esm/storageBlobInterfaces.js.map +1 -0
  62. package/dist/esm/util/error.d.ts +9 -0
  63. package/dist/esm/util/error.d.ts.map +1 -0
  64. package/dist/esm/util/error.js +19 -0
  65. package/dist/esm/util/error.js.map +1 -0
  66. package/package.json +86 -64
  67. package/dist/index.js.map +0 -1
  68. package/dist-esm/src/blobCheckpointStore.js.map +0 -1
  69. package/dist-esm/src/index.js +0 -6
  70. package/dist-esm/src/index.js.map +0 -1
  71. package/dist-esm/src/storageBlobInterfaces.js +0 -4
  72. package/dist-esm/src/storageBlobInterfaces.js.map +0 -1
  73. package/dist-esm/src/util/error.js.map +0 -1
package/README.md CHANGED
@@ -3,9 +3,10 @@
3
3
  An Azure Blob storage based solution to store checkpoints and to aid in load balancing when using `EventHubConsumerClient` from the [@azure/event-hubs](https://www.npmjs.com/package/@azure/event-hubs) library
4
4
 
5
5
  Key links:
6
+
6
7
  - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/eventhubs-checkpointstore-blob)
7
8
  - [Package (npm)](https://www.npmjs.com/package/@azure/eventhubs-checkpointstore-blob)
8
- - [API Reference Documentation](https://docs.microsoft.com/javascript/api/@azure/eventhubs-checkpointstore-blob/)
9
+ - [API Reference Documentation](https://learn.microsoft.com/javascript/api/@azure/eventhubs-checkpointstore-blob/)
9
10
  - [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/eventhubs-checkpointstore-blob/samples)
10
11
 
11
12
  ## Getting started
@@ -20,8 +21,8 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
20
21
  ### Prerequisites
21
22
 
22
23
  - An [Azure subscription](https://azure.microsoft.com/free/)
23
- - An [Event Hubs Namespace](https://docs.microsoft.com/azure/event-hubs/)
24
- - A [Storage account](https://docs.microsoft.com/azure/storage/blobs/storage-blobs-introduction)
24
+ - An [Event Hubs Namespace](https://learn.microsoft.com/azure/event-hubs/)
25
+ - A [Storage account](https://learn.microsoft.com/azure/storage/blobs/storage-blobs-introduction)
25
26
 
26
27
  ### Install the package
27
28
 
@@ -57,7 +58,7 @@ You also need to enable `compilerOptions.allowSyntheticDefaultImports` in your t
57
58
  and to provide resiliency if a failover between readers running on different machines occurs. It is possible to return to older data by specifying a lower offset from this checkpointing process.
58
59
  Through this mechanism, checkpointing enables both failover resiliency and event stream replay.
59
60
 
60
- A [BlobCheckpointStore](https://docs.microsoft.com/javascript/api/@azure/eventhubs-checkpointstore-blob/blobcheckpointstore)
61
+ A [BlobCheckpointStore](https://learn.microsoft.com/javascript/api/@azure/eventhubs-checkpointstore-blob/blobcheckpointstore)
61
62
  is a class that implements key methods required by the EventHubConsumerClient to balance load and update checkpoints.
62
63
 
63
64
  ## Examples
@@ -79,16 +80,16 @@ if (!containerClient.exists()) {
79
80
  await containerClient.create(); // This can be skipped if the container already exists
80
81
  }
81
82
 
82
- const checkpointStore = new BlobCheckpointStore(containerClient);
83
+ const checkpointStore = new BlobCheckpointStore(containerClient);
83
84
  ```
84
85
 
85
86
  ### Checkpoint events using Azure Blob storage
86
87
 
87
88
  To checkpoint events received using Azure Blob Storage, you will need to pass an object
88
- that is compatible with the [SubscriptionEventHandlers](https://docs.microsoft.com/javascript/api/@azure/event-hubs/subscriptioneventhandlers)
89
+ that is compatible with the [SubscriptionEventHandlers](https://learn.microsoft.com/javascript/api/@azure/event-hubs/subscriptioneventhandlers)
89
90
  interface along with code to call the `updateCheckpoint()` method.
90
91
 
91
- In this example, `SubscriptionHandlers` implements [SubscriptionEventHandlers](https://docs.microsoft.com/javascript/api/@azure/event-hubs/subscriptioneventhandlers) and also handles checkpointing.
92
+ In this example, `SubscriptionHandlers` implements [SubscriptionEventHandlers](https://learn.microsoft.com/javascript/api/@azure/event-hubs/subscriptioneventhandlers) and also handles checkpointing.
92
93
 
93
94
  ```javascript
94
95
  const { EventHubConsumerClient } = require("@azure/event-hubs");
@@ -113,7 +114,7 @@ async function main() {
113
114
  consumerGroup,
114
115
  eventHubConnectionString,
115
116
  eventHubName,
116
- checkpointStore
117
+ checkpointStore,
117
118
  );
118
119
 
119
120
  const subscription = consumerClient.subscribe({
@@ -136,7 +137,7 @@ async function main() {
136
137
  // handle any errors that occur during the course of
137
138
  // this subscription
138
139
  console.log(`Errors in subscription to partition ${context.partitionId}: ${err}`);
139
- }
140
+ },
140
141
  });
141
142
 
142
143
  // Wait for a few seconds to receive events before closing
@@ -1,124 +1,68 @@
1
- import { AzureLogger } from '@azure/logger';
2
- import { BlobItem } from '@azure/storage-blob';
3
- import { BlobSetMetadataOptions } from '@azure/storage-blob';
4
- import { BlockBlobUploadOptions } from '@azure/storage-blob';
5
- import { BlockBlobUploadResponse } from '@azure/storage-blob';
6
- import { Checkpoint } from '@azure/event-hubs';
7
- import { CheckpointStore } from '@azure/event-hubs';
8
- import { ContainerListBlobFlatSegmentResponse } from '@azure/storage-blob';
9
- import { ContainerListBlobsOptions } from '@azure/storage-blob';
10
- import { ContainerSetMetadataResponse } from '@azure/storage-blob';
11
- import { HttpRequestBody } from '@azure/storage-blob';
12
- import { Metadata } from '@azure/storage-blob';
13
- import { OperationOptions } from '@azure/event-hubs';
14
- import { PagedAsyncIterableIterator } from '@azure/core-paging';
15
- import { PartitionOwnership } from '@azure/event-hubs';
16
-
17
- /**
18
- * An implementation of CheckpointStore that uses Azure Blob Storage to persist checkpoint data.
19
- */
20
- export declare class BlobCheckpointStore implements CheckpointStore {
21
- private _containerClient;
22
- /**
23
- * Constructs a new instance of {@link BlobCheckpointStore}
24
- * @param containerClient - An instance of a storage blob ContainerClient.
25
- */
26
- constructor(containerClient: ContainerClientLike);
27
- /**
28
- * Get the list of all existing partition ownership from the underlying data store. May return empty
29
- * results if there are is no existing ownership information.
30
- * Partition Ownership contains the information on which `EventHubConsumerClient` subscribe call is currently processing the partition.
31
- *
32
- * @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to
33
- * <yournamespace>.servicebus.windows.net.
34
- * @param eventHubName - The event hub name.
35
- * @param consumerGroup - The consumer group name.
36
- * @param options - A set of options that can be specified to influence the behavior of this method.
37
- * - `abortSignal`: A signal used to request operation cancellation.
38
- * - `tracingOptions`: Options for configuring tracing.
39
- * @returns Partition ownership details of all the partitions that have had an owner.
40
- */
41
- listOwnership(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string, options?: OperationOptions): Promise<PartitionOwnership[]>;
42
- /**
43
- * Claim ownership of a list of partitions. This will return the list of partitions that were
44
- * successfully claimed.
45
- *
46
- * @param partitionOwnership - The list of partition ownership this instance is claiming to own.
47
- * @param options - A set of options that can be specified to influence the behavior of this method.
48
- * - `abortSignal`: A signal used to request operation cancellation.
49
- * - `tracingOptions`: Options for configuring tracing.
50
- * @returns A list partitions this instance successfully claimed ownership.
51
- */
52
- claimOwnership(partitionOwnership: PartitionOwnership[], options?: OperationOptions): Promise<PartitionOwnership[]>;
53
- /**
54
- * Lists all the checkpoints in a data store for a given namespace, eventhub and consumer group.
55
- *
56
- * @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to
57
- * <yournamespace>.servicebus.windows.net.
58
- * @param eventHubName - The event hub name.
59
- * @param consumerGroup - The consumer group name.
60
- * @param options - A set of options that can be specified to influence the behavior of this method.
61
- * - `abortSignal`: A signal used to request operation cancellation.
62
- * - `tracingOptions`: Options for configuring tracing.
63
- */
64
- listCheckpoints(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string, options?: OperationOptions): Promise<Checkpoint[]>;
65
- /**
66
- * Updates the checkpoint in the data store for a partition.
67
- *
68
- * @param checkpoint - The checkpoint.
69
- * @param options - A set of options that can be specified to influence the behavior of this method.
70
- * - `abortSignal`: A signal used to request operation cancellation.
71
- * - `tracingOptions`: Options for configuring tracing.
72
- * @returns The new etag on successful update.
73
- */
74
- updateCheckpoint(checkpoint: Checkpoint, options?: OperationOptions): Promise<void>;
75
- private static getBlobPrefix;
76
- private _setBlobMetadata;
77
- }
78
-
79
- /**
80
- * An interface compatible with an instance of {@link BlobClient}.
81
- */
82
- export declare interface BlobClientLike {
83
- /**
84
- * Creates a BlockBlobClient object.
85
- */
86
- getBlockBlobClient(): BlockBlobClientLike;
87
- }
88
-
89
- /**
90
- * An interface compatible with Storage Blob's BlockBlobClient class.
91
- */
92
- export declare interface BlockBlobClientLike {
93
- /**
94
- * Creates a new block blob, or updated the content of an existing block blob.
95
- */
96
- upload(body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise<BlockBlobUploadResponse>;
97
- /**
98
- * Sets user-defined metadata for the specified blob as one or more name-value pairs.
99
- */
100
- setMetadata(metadata?: Metadata, options?: BlobSetMetadataOptions): Promise<ContainerSetMetadataResponse>;
101
- }
102
-
103
- /**
104
- * An interface compatible with Storage Blob's ContainerClient class.
105
- */
106
- export declare interface ContainerClientLike {
107
- /**
108
- * Creates a {@link BlobClient}
109
- */
110
- getBlobClient(blobName: string): BlobClientLike;
111
- /**
112
- * Returns an async iterable iterator to list all the blobs
113
- * under the specified account.
114
- */
115
- listBlobsFlat(options?: ContainerListBlobsOptions): PagedAsyncIterableIterator<BlobItem, ContainerListBlobFlatSegmentResponse>;
116
- }
117
-
118
- /**
119
- * The `@azure/logger` configuration for this package.
120
- * This will output logs using the `azure:eventhubs-checkpointstore-blob` namespace prefix.
121
- */
122
- export declare const logger: AzureLogger;
123
-
124
- export { }
1
+ import type { CheckpointStore, PartitionOwnership, Checkpoint, OperationOptions } from "@azure/event-hubs";
2
+ import type { ContainerClientLike } from "./storageBlobInterfaces.js";
3
+ /**
4
+ * An implementation of CheckpointStore that uses Azure Blob Storage to persist checkpoint data.
5
+ */
6
+ export declare class BlobCheckpointStore implements CheckpointStore {
7
+ private _containerClient;
8
+ /**
9
+ * Constructs a new instance of {@link BlobCheckpointStore}
10
+ * @param containerClient - An instance of a storage blob ContainerClient.
11
+ */
12
+ constructor(containerClient: ContainerClientLike);
13
+ /**
14
+ * Get the list of all existing partition ownership from the underlying data store. May return empty
15
+ * results if there are is no existing ownership information.
16
+ * Partition Ownership contains the information on which `EventHubConsumerClient` subscribe call is currently processing the partition.
17
+ *
18
+ * @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to
19
+ * <yournamespace>.servicebus.windows.net.
20
+ * @param eventHubName - The event hub name.
21
+ * @param consumerGroup - The consumer group name.
22
+ * @param options - A set of options that can be specified to influence the behavior of this method.
23
+ * - `abortSignal`: A signal used to request operation cancellation.
24
+ * - `tracingOptions`: Options for configuring tracing.
25
+ * @returns Partition ownership details of all the partitions that have had an owner.
26
+ */
27
+ listOwnership(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string, options?: OperationOptions): Promise<PartitionOwnership[]>;
28
+ /**
29
+ * Claim ownership of a list of partitions. This will return the list of partitions that were
30
+ * successfully claimed.
31
+ *
32
+ * @param partitionOwnership - The list of partition ownership this instance is claiming to own.
33
+ * @param options - A set of options that can be specified to influence the behavior of this method.
34
+ * - `abortSignal`: A signal used to request operation cancellation.
35
+ * - `tracingOptions`: Options for configuring tracing.
36
+ * @returns A list partitions this instance successfully claimed ownership.
37
+ */
38
+ claimOwnership(partitionOwnership: PartitionOwnership[], options?: OperationOptions): Promise<PartitionOwnership[]>;
39
+ /**
40
+ * Lists all the checkpoints in a data store for a given namespace, eventhub and consumer group.
41
+ *
42
+ * @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to
43
+ * <yournamespace>.servicebus.windows.net.
44
+ * @param eventHubName - The event hub name.
45
+ * @param consumerGroup - The consumer group name.
46
+ * @param options - A set of options that can be specified to influence the behavior of this method.
47
+ * - `abortSignal`: A signal used to request operation cancellation.
48
+ * - `tracingOptions`: Options for configuring tracing.
49
+ */
50
+ listCheckpoints(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string, options?: OperationOptions): Promise<Checkpoint[]>;
51
+ /**
52
+ * Updates the checkpoint in the data store for a partition.
53
+ *
54
+ * @param checkpoint - The checkpoint.
55
+ * @param options - A set of options that can be specified to influence the behavior of this method.
56
+ * - `abortSignal`: A signal used to request operation cancellation.
57
+ * - `tracingOptions`: Options for configuring tracing.
58
+ * @returns The new etag on successful update.
59
+ */
60
+ updateCheckpoint(checkpoint: Checkpoint, options?: OperationOptions): Promise<void>;
61
+ private static getBlobPrefix;
62
+ private _setBlobMetadata;
63
+ }
64
+ /**
65
+ * @internal
66
+ */
67
+ export declare function parseIntOrThrow(blobName: string, fieldName: string, numStr: string | undefined): number;
68
+ //# sourceMappingURL=blobCheckpointStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blobCheckpointStore.d.ts","sourceRoot":"","sources":["../../src/blobCheckpointStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE;;GAEG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,gBAAgB,CAAsB;IAE9C;;;OAGG;gBACS,eAAe,EAAE,mBAAmB;IAGhD;;;;;;;;;;;;;OAaG;IACG,aAAa,CACjB,uBAAuB,EAAE,MAAM,EAC/B,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAoDhC;;;;;;;;;OASG;IACG,cAAc,CAClB,kBAAkB,EAAE,kBAAkB,EAAE,EACxC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAiDhC;;;;;;;;;;OAUG;IACG,eAAe,CACnB,uBAAuB,EAAE,MAAM,EAC/B,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,UAAU,EAAE,CAAC;IA+CxB;;;;;;;;OAQG;IACG,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwC7F,OAAO,CAAC,MAAM,CAAC,aAAa;YAoBd,gBAAgB;CA+C/B;AAUD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,MAAM,CAcR"}
@@ -1,8 +1,8 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { __asyncValues } from "tslib";
4
- import { logger, logErrorStackTrace } from "./log";
5
- import { throwTypeErrorIfParameterMissing } from "./util/error";
4
+ import { logger, logErrorStackTrace } from "./log.js";
5
+ import { throwTypeErrorIfParameterMissing } from "./util/error.js";
6
6
  /**
7
7
  * An implementation of CheckpointStore that uses Azure Blob Storage to persist checkpoint data.
8
8
  */
@@ -165,7 +165,7 @@ export class BlobCheckpointStore {
165
165
  const checkpointMetadata = (_d = blob.metadata) !== null && _d !== void 0 ? _d : {};
166
166
  const offset = checkpointMetadata.offset;
167
167
  if (offset == null) {
168
- throw new Error(`Missing metadata property 'offset' on blob '${blobName}'`);
168
+ throw new Error(`Missing metadata property 'offset' on blob '${blob.name}'`);
169
169
  }
170
170
  const sequenceNumber = parseIntOrThrow(blob.name, "sequencenumber", checkpointMetadata.sequencenumber);
171
171
  checkpoints.push({
@@ -209,11 +209,11 @@ export class BlobCheckpointStore {
209
209
  return;
210
210
  }
211
211
  catch (err) {
212
- logger.warning(`Error occurred while upating the checkpoint for partition: ${checkpoint.partitionId}.`, err.message);
212
+ logger.warning(`Error occurred while updating the checkpoint for partition: ${checkpoint.partitionId}.`, err.message);
213
213
  logErrorStackTrace(err);
214
214
  if ((err === null || err === void 0 ? void 0 : err.name) === "AbortError")
215
215
  throw err;
216
- throw new Error(`Error occurred while upating the checkpoint for partition: ${checkpoint.partitionId}, ${err}`);
216
+ throw err;
217
217
  }
218
218
  }
219
219
  static getBlobPrefix(params) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blobCheckpointStore.js","sourceRoot":"","sources":["../../src/blobCheckpointStore.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AASlC,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEtD,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;GAEG;AACH,MAAM,OAAO,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W;oBACX,QAAQ,EAAE,QAAoB;oBAC9B,cAAc;iBACf,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAUD;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAgB,EAChB,SAAiB,EACjB,MAA0B;IAE1B,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,8BAA8B,SAAS,cAAc,QAAQ,GAAG,CAAC,CAAC;IACpF,CAAC;IAED,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAEjC,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,sCAAsC,SAAS,cAAc,QAAQ,eAAe,CACrF,CAAC;IACJ,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CheckpointStore,\n PartitionOwnership,\n Checkpoint,\n OperationOptions,\n} from \"@azure/event-hubs\";\nimport type { Metadata, RestError, BlobSetMetadataResponse } from \"@azure/storage-blob\";\nimport { logger, logErrorStackTrace } from \"./log.js\";\nimport type { ContainerClientLike } from \"./storageBlobInterfaces.js\";\nimport { throwTypeErrorIfParameterMissing } from \"./util/error.js\";\n\n/**\n * An implementation of CheckpointStore that uses Azure Blob Storage to persist checkpoint data.\n */\nexport class BlobCheckpointStore implements CheckpointStore {\n private _containerClient: ContainerClientLike;\n\n /**\n * Constructs a new instance of {@link BlobCheckpointStore}\n * @param containerClient - An instance of a storage blob ContainerClient.\n */\n constructor(containerClient: ContainerClientLike) {\n this._containerClient = containerClient;\n }\n /**\n * Get the list of all existing partition ownership from the underlying data store. May return empty\n * results if there are is no existing ownership information.\n * Partition Ownership contains the information on which `EventHubConsumerClient` subscribe call is currently processing the partition.\n *\n * @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to\n * <yournamespace>.servicebus.windows.net.\n * @param eventHubName - The event hub name.\n * @param consumerGroup - The consumer group name.\n * @param options - A set of options that can be specified to influence the behavior of this method.\n * - `abortSignal`: A signal used to request operation cancellation.\n * - `tracingOptions`: Options for configuring tracing.\n * @returns Partition ownership details of all the partitions that have had an owner.\n */\n async listOwnership(\n fullyQualifiedNamespace: string,\n eventHubName: string,\n consumerGroup: string,\n options: OperationOptions = {},\n ): Promise<PartitionOwnership[]> {\n const partitionOwnershipArray: PartitionOwnership[] = [];\n const { abortSignal, tracingOptions } = options;\n\n const blobPrefix = BlobCheckpointStore.getBlobPrefix({\n type: \"ownership\",\n fullyQualifiedNamespace,\n eventHubName,\n consumerGroup: consumerGroup,\n });\n\n try {\n const blobs = this._containerClient.listBlobsFlat({\n abortSignal,\n includeMetadata: true,\n prefix: blobPrefix,\n tracingOptions,\n });\n\n for await (const blob of blobs) {\n const blobPath = blob.name.split(\"/\");\n const blobName = blobPath[blobPath.length - 1];\n\n const ownershipMetadata = (blob.metadata as OwnershipMetadata) ?? {};\n\n if (ownershipMetadata.ownerid == null) {\n throw new Error(`Missing ownerid in metadata for blob ${blob.name}`);\n }\n\n const partitionOwnership: PartitionOwnership = {\n fullyQualifiedNamespace,\n eventHubName,\n consumerGroup: consumerGroup,\n ownerId: ownershipMetadata.ownerid,\n partitionId: blobName,\n lastModifiedTimeInMs:\n blob.properties.lastModified && blob.properties.lastModified.getTime(),\n etag: blob.properties.etag,\n };\n partitionOwnershipArray.push(partitionOwnership);\n }\n return partitionOwnershipArray;\n } catch (err: any) {\n logger.warning(`Error occurred while fetching the list of blobs`, err.message);\n logErrorStackTrace(err);\n\n if (err?.name === \"AbortError\") throw err;\n\n throw new Error(`Error occurred while fetching the list of blobs. \\n${err}`);\n }\n }\n\n /**\n * Claim ownership of a list of partitions. This will return the list of partitions that were\n * successfully claimed.\n *\n * @param partitionOwnership - The list of partition ownership this instance is claiming to own.\n * @param options - A set of options that can be specified to influence the behavior of this method.\n * - `abortSignal`: A signal used to request operation cancellation.\n * - `tracingOptions`: Options for configuring tracing.\n * @returns A list partitions this instance successfully claimed ownership.\n */\n async claimOwnership(\n partitionOwnership: PartitionOwnership[],\n options: OperationOptions = {},\n ): Promise<PartitionOwnership[]> {\n const partitionOwnershipArray: PartitionOwnership[] = [];\n for (const ownership of partitionOwnership) {\n const blobName = BlobCheckpointStore.getBlobPrefix({ type: \"ownership\", ...ownership });\n try {\n const updatedBlobResponse = await this._setBlobMetadata(\n blobName,\n {\n ownerid: ownership.ownerId,\n },\n ownership.etag,\n options,\n );\n\n if (updatedBlobResponse.lastModified) {\n ownership.lastModifiedTimeInMs = updatedBlobResponse.lastModified.getTime();\n }\n\n ownership.etag = updatedBlobResponse.etag;\n partitionOwnershipArray.push(ownership);\n logger.info(\n `[${ownership.ownerId}] Claimed ownership successfully for partition: ${ownership.partitionId}`,\n `LastModifiedTime: ${ownership.lastModifiedTimeInMs}, ETag: ${ownership.etag}`,\n );\n } catch (err: any) {\n const restError = err as RestError;\n\n if (restError.statusCode === 412) {\n // etag failures (precondition not met) aren't fatal errors. They happen\n // as multiple consumers attempt to claim the same partition (first one wins)\n // and losers get this error.\n logger.verbose(\n `[${ownership.ownerId}] Did not claim partition ${ownership.partitionId}. Another processor has already claimed it.`,\n );\n continue;\n }\n\n logger.warning(\n `Error occurred while claiming ownership for partition: ${ownership.partitionId}`,\n err.message,\n );\n logErrorStackTrace(err);\n\n throw err;\n }\n }\n return partitionOwnershipArray;\n }\n\n /**\n * Lists all the checkpoints in a data store for a given namespace, eventhub and consumer group.\n *\n * @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to\n * <yournamespace>.servicebus.windows.net.\n * @param eventHubName - The event hub name.\n * @param consumerGroup - The consumer group name.\n * @param options - A set of options that can be specified to influence the behavior of this method.\n * - `abortSignal`: A signal used to request operation cancellation.\n * - `tracingOptions`: Options for configuring tracing.\n */\n async listCheckpoints(\n fullyQualifiedNamespace: string,\n eventHubName: string,\n consumerGroup: string,\n options: OperationOptions = {},\n ): Promise<Checkpoint[]> {\n const { abortSignal, tracingOptions } = options;\n const blobPrefix = BlobCheckpointStore.getBlobPrefix({\n type: \"checkpoint\",\n fullyQualifiedNamespace,\n eventHubName,\n consumerGroup,\n });\n\n const blobs = this._containerClient.listBlobsFlat({\n abortSignal,\n includeMetadata: true,\n prefix: blobPrefix,\n tracingOptions,\n });\n\n const checkpoints: Checkpoint[] = [];\n\n for await (const blob of blobs) {\n const blobPath = blob.name.split(\"/\");\n const blobName = blobPath[blobPath.length - 1];\n\n const checkpointMetadata = (blob.metadata as CheckpointMetadata) ?? {};\n\n const offset = checkpointMetadata.offset;\n if (offset == null) {\n throw new Error(`Missing metadata property 'offset' on blob '${blob.name}'`);\n }\n const sequenceNumber = parseIntOrThrow(\n blob.name,\n \"sequencenumber\",\n checkpointMetadata.sequencenumber,\n );\n\n checkpoints.push({\n consumerGroup,\n eventHubName,\n fullyQualifiedNamespace,\n partitionId: blobName,\n offset,\n sequenceNumber,\n });\n }\n\n return checkpoints;\n }\n\n /**\n * Updates the checkpoint in the data store for a partition.\n *\n * @param checkpoint - The checkpoint.\n * @param options - A set of options that can be specified to influence the behavior of this method.\n * - `abortSignal`: A signal used to request operation cancellation.\n * - `tracingOptions`: Options for configuring tracing.\n * @returns The new etag on successful update.\n */\n async updateCheckpoint(checkpoint: Checkpoint, options: OperationOptions = {}): Promise<void> {\n throwTypeErrorIfParameterMissing(\n \"updateCheckpoint\",\n \"sequenceNumber\",\n checkpoint.sequenceNumber,\n );\n throwTypeErrorIfParameterMissing(\"updateCheckpoint\", \"offset\", checkpoint.offset);\n\n const blobName = BlobCheckpointStore.getBlobPrefix({ type: \"checkpoint\", ...checkpoint });\n try {\n const metadataResponse = await this._setBlobMetadata(\n blobName,\n {\n sequencenumber: checkpoint.sequenceNumber.toString(),\n offset: checkpoint.offset.toString(),\n },\n undefined,\n options,\n );\n\n logger.verbose(\n `Updated checkpoint successfully for partition: ${checkpoint.partitionId}`,\n `LastModifiedTime: ${metadataResponse.lastModified!.toISOString()}, ETag: ${\n metadataResponse.etag\n }`,\n );\n return;\n } catch (err: any) {\n logger.warning(\n `Error occurred while updating the checkpoint for partition: ${checkpoint.partitionId}.`,\n err.message,\n );\n logErrorStackTrace(err);\n\n if (err?.name === \"AbortError\") throw err;\n\n throw err;\n }\n }\n\n private static getBlobPrefix(params: {\n type: \"ownership\" | \"checkpoint\";\n fullyQualifiedNamespace: string;\n eventHubName: string;\n consumerGroup: string;\n partitionId?: string;\n }): string {\n // none of these are case-sensitive in eventhubs so we need to make sure we don't accidentally allow\n // the user to create a case-sensitive blob for their state!\n const consumerGroupName = params.consumerGroup.toLowerCase();\n const eventHubName = params.eventHubName.toLowerCase();\n const fullyQualifiedNamespace = params.fullyQualifiedNamespace.toLowerCase();\n\n if (params.partitionId) {\n return `${fullyQualifiedNamespace}/${eventHubName}/${consumerGroupName}/${params.type}/${params.partitionId}`;\n } else {\n return `${fullyQualifiedNamespace}/${eventHubName}/${consumerGroupName}/${params.type}/`;\n }\n }\n\n private async _setBlobMetadata(\n blobName: string,\n metadata: OwnershipMetadata | CheckpointMetadata,\n etag: string | undefined,\n options: OperationOptions = {},\n ): Promise<BlobSetMetadataResponse> {\n const { abortSignal, tracingOptions } = options;\n const blockBlobClient = this._containerClient.getBlobClient(blobName).getBlockBlobClient();\n\n // When we have an etag, we know the blob existed.\n // If we encounter an error we should fail.\n if (etag) {\n return blockBlobClient.setMetadata(metadata as Metadata, {\n abortSignal,\n conditions: {\n ifMatch: etag,\n },\n tracingOptions,\n });\n } else {\n try {\n // Attempt to set metadata, and fallback to upload if the blob doesn't already exist.\n // This avoids poor performance in storage accounts with soft-delete or blob versioning enabled.\n // https://github.com/Azure/azure-sdk-for-js/issues/10132\n return await blockBlobClient.setMetadata(metadata as Metadata, {\n abortSignal,\n tracingOptions,\n });\n } catch (err: any) {\n // Check if the error is `BlobNotFound` and fallback to `upload` if it is.\n if (err?.name !== \"RestError\") {\n throw err;\n }\n const errorDetails = (err as RestError).details as { [field: string]: string } | undefined;\n const errorCode = errorDetails?.errorCode;\n if (!errorCode || errorCode !== \"BlobNotFound\") {\n throw err;\n }\n\n return blockBlobClient.upload(\"\", 0, {\n abortSignal,\n metadata: metadata as Metadata,\n tracingOptions,\n });\n }\n }\n }\n}\n\ntype OwnershipMetadata = {\n [k in \"ownerid\"]: string | undefined;\n};\n\ntype CheckpointMetadata = {\n [k in \"sequencenumber\" | \"offset\"]: string | undefined;\n};\n\n/**\n * @internal\n */\nexport function parseIntOrThrow(\n blobName: string,\n fieldName: string,\n numStr: string | undefined,\n): number {\n if (numStr == null) {\n throw new Error(`Missing metadata property '${fieldName}' on blob '${blobName}'`);\n }\n\n const num = parseInt(numStr, 10);\n\n if (isNaN(num)) {\n throw new Error(\n `Failed to parse metadata property '${fieldName}' on blob '${blobName}' as a number`,\n );\n }\n\n return num;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export { BlobCheckpointStore } from "./blobCheckpointStore.js";
2
+ export { ContainerClientLike, BlobClientLike, BlockBlobClientLike, } from "./storageBlobInterfaces.js";
3
+ export { logger } from "./log.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export { BlobCheckpointStore } from "./blobCheckpointStore.js";
4
+ export { logger } from "./log.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAM/D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { BlobCheckpointStore } from \"./blobCheckpointStore.js\";\nexport {\n ContainerClientLike,\n BlobClientLike,\n BlockBlobClientLike,\n} from \"./storageBlobInterfaces.js\";\nexport { logger } from \"./log.js\";\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The `@azure/logger` configuration for this package.
3
+ * This will output logs using the `azure:eventhubs-checkpointstore-blob` namespace prefix.
4
+ */
5
+ export declare const logger: import("@azure/logger").AzureLogger;
6
+ /**
7
+ * Logs the error's stack trace to "verbose" if a stack trace is available.
8
+ * @param error - Error containing a stack trace.
9
+ * @internal
10
+ */
11
+ export declare function logErrorStackTrace(error: unknown): void;
12
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,eAAO,MAAM,MAAM,qCAAuD,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIvD"}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createClientLogger } from "@azure/logger";
4
4
  /**
5
5
  * The `@azure/logger` configuration for this package.
@@ -1 +1 @@
1
- {"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,gCAAgC,CAAC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;QAC3D,MAAM,CAAC,OAAO,CAAE,KAAa,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The `@azure/logger` configuration for this package.\n * This will output logs using the `azure:eventhubs-checkpointstore-blob` namespace prefix.\n */\nexport const logger = createClientLogger(\"eventhubs-checkpointstore-blob\");\n\n/**\n * Logs the error's stack trace to \"verbose\" if a stack trace is available.\n * @param error - Error containing a stack trace.\n * @internal\n */\nexport function logErrorStackTrace(error: unknown): void {\n if (error && typeof error === \"object\" && \"stack\" in error) {\n logger.verbose((error as any).stack);\n }\n}\n"]}
1
+ {"version":3,"file":"log.js","sourceRoot":"","sources":["../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,gCAAgC,CAAC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;QAC3D,MAAM,CAAC,OAAO,CAAE,KAAa,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The `@azure/logger` configuration for this package.\n * This will output logs using the `azure:eventhubs-checkpointstore-blob` namespace prefix.\n */\nexport const logger = createClientLogger(\"eventhubs-checkpointstore-blob\");\n\n/**\n * Logs the error's stack trace to \"verbose\" if a stack trace is available.\n * @param error - Error containing a stack trace.\n * @internal\n */\nexport function logErrorStackTrace(error: unknown): void {\n if (error && typeof error === \"object\" && \"stack\" in error) {\n logger.verbose((error as any).stack);\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,39 @@
1
+ import type { Metadata, BlobItem, ContainerListBlobFlatSegmentResponse, ContainerListBlobsOptions, BlockBlobUploadOptions, BlockBlobUploadResponse, HttpRequestBody, BlobSetMetadataOptions, ContainerSetMetadataResponse } from "@azure/storage-blob";
2
+ import type { PagedAsyncIterableIterator } from "@azure/core-paging";
3
+ /**
4
+ * An interface compatible with an instance of {@link BlobClient}.
5
+ */
6
+ export interface BlobClientLike {
7
+ /**
8
+ * Creates a BlockBlobClient object.
9
+ */
10
+ getBlockBlobClient(): BlockBlobClientLike;
11
+ }
12
+ /**
13
+ * An interface compatible with Storage Blob's ContainerClient class.
14
+ */
15
+ export interface ContainerClientLike {
16
+ /**
17
+ * Creates a {@link BlobClient}
18
+ */
19
+ getBlobClient(blobName: string): BlobClientLike;
20
+ /**
21
+ * Returns an async iterable iterator to list all the blobs
22
+ * under the specified account.
23
+ */
24
+ listBlobsFlat(options?: ContainerListBlobsOptions): PagedAsyncIterableIterator<BlobItem, ContainerListBlobFlatSegmentResponse>;
25
+ }
26
+ /**
27
+ * An interface compatible with Storage Blob's BlockBlobClient class.
28
+ */
29
+ export interface BlockBlobClientLike {
30
+ /**
31
+ * Creates a new block blob, or updated the content of an existing block blob.
32
+ */
33
+ upload(body: HttpRequestBody, contentLength: number, options?: BlockBlobUploadOptions): Promise<BlockBlobUploadResponse>;
34
+ /**
35
+ * Sets user-defined metadata for the specified blob as one or more name-value pairs.
36
+ */
37
+ setMetadata(metadata?: Metadata, options?: BlobSetMetadataOptions): Promise<ContainerSetMetadataResponse>;
38
+ }
39
+ //# sourceMappingURL=storageBlobInterfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageBlobInterfaces.d.ts","sourceRoot":"","sources":["../../src/storageBlobInterfaces.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,oCAAoC,EACpC,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,kBAAkB,IAAI,mBAAmB,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAC;IAChD;;;OAGG;IACH,aAAa,CACX,OAAO,CAAC,EAAE,yBAAyB,GAClC,0BAA0B,CAAC,QAAQ,EAAE,oCAAoC,CAAC,CAAC;CAC/E;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,eAAe,EACrB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACpC;;OAEG;IACH,WAAW,CACT,QAAQ,CAAC,EAAE,QAAQ,EACnB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAC1C"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=storageBlobInterfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageBlobInterfaces.js","sourceRoot":"","sources":["../../src/storageBlobInterfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n Metadata,\n BlobItem,\n ContainerListBlobFlatSegmentResponse,\n ContainerListBlobsOptions,\n BlockBlobUploadOptions,\n BlockBlobUploadResponse,\n HttpRequestBody,\n BlobSetMetadataOptions,\n ContainerSetMetadataResponse,\n} from \"@azure/storage-blob\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * An interface compatible with an instance of {@link BlobClient}.\n */\nexport interface BlobClientLike {\n /**\n * Creates a BlockBlobClient object.\n */\n getBlockBlobClient(): BlockBlobClientLike;\n}\n\n/**\n * An interface compatible with Storage Blob's ContainerClient class.\n */\nexport interface ContainerClientLike {\n /**\n * Creates a {@link BlobClient}\n */\n getBlobClient(blobName: string): BlobClientLike;\n /**\n * Returns an async iterable iterator to list all the blobs\n * under the specified account.\n */\n listBlobsFlat(\n options?: ContainerListBlobsOptions,\n ): PagedAsyncIterableIterator<BlobItem, ContainerListBlobFlatSegmentResponse>;\n}\n\n/**\n * An interface compatible with Storage Blob's BlockBlobClient class.\n */\nexport interface BlockBlobClientLike {\n /**\n * Creates a new block blob, or updated the content of an existing block blob.\n */\n upload(\n body: HttpRequestBody,\n contentLength: number,\n options?: BlockBlobUploadOptions,\n ): Promise<BlockBlobUploadResponse>;\n /**\n * Sets user-defined metadata for the specified blob as one or more name-value pairs.\n */\n setMetadata(\n metadata?: Metadata,\n options?: BlobSetMetadataOptions,\n ): Promise<ContainerSetMetadataResponse>;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @internal
3
+ * Logs and Throws TypeError if given parameter is undefined or null
4
+ * @param methodName - Name of the method that was passed the parameter
5
+ * @param parameterName - Name of the parameter to check
6
+ * @param parameterValue - Value of the parameter to check
7
+ */
8
+ export declare function throwTypeErrorIfParameterMissing(methodName: string, parameterName: string, parameterValue: unknown): void;
9
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/util/error.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,OAAO,GACtB,IAAI,CASN"}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { logger, logErrorStackTrace } from "../log";
2
+ // Licensed under the MIT License.
3
+ import { logger, logErrorStackTrace } from "../log.js";
4
4
  /**
5
5
  * @internal
6
6
  * Logs and Throws TypeError if given parameter is undefined or null
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/util/error.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,UAAU,gCAAgC,CAC9C,UAAkB,EAClB,aAAqB,EACrB,cAAuB;IAEvB,IAAI,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QAC5D,MAAM,KAAK,GAAG,IAAI,SAAS,CACzB,GAAG,UAAU,sCAAsC,aAAa,GAAG,CACpE,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC9B,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC1B,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger, logErrorStackTrace } from \"../log.js\";\n\n/**\n * @internal\n * Logs and Throws TypeError if given parameter is undefined or null\n * @param methodName - Name of the method that was passed the parameter\n * @param parameterName - Name of the parameter to check\n * @param parameterValue - Value of the parameter to check\n */\nexport function throwTypeErrorIfParameterMissing(\n methodName: string,\n parameterName: string,\n parameterValue: unknown,\n): void {\n if (parameterValue === undefined || parameterValue === null) {\n const error = new TypeError(\n `${methodName} called without required argument \"${parameterName}\"`,\n );\n logger.warning(error.message);\n logErrorStackTrace(error);\n throw error;\n }\n}\n"]}
@@ -0,0 +1,68 @@
1
+ import type { CheckpointStore, PartitionOwnership, Checkpoint, OperationOptions } from "@azure/event-hubs";
2
+ import type { ContainerClientLike } from "./storageBlobInterfaces.js";
3
+ /**
4
+ * An implementation of CheckpointStore that uses Azure Blob Storage to persist checkpoint data.
5
+ */
6
+ export declare class BlobCheckpointStore implements CheckpointStore {
7
+ private _containerClient;
8
+ /**
9
+ * Constructs a new instance of {@link BlobCheckpointStore}
10
+ * @param containerClient - An instance of a storage blob ContainerClient.
11
+ */
12
+ constructor(containerClient: ContainerClientLike);
13
+ /**
14
+ * Get the list of all existing partition ownership from the underlying data store. May return empty
15
+ * results if there are is no existing ownership information.
16
+ * Partition Ownership contains the information on which `EventHubConsumerClient` subscribe call is currently processing the partition.
17
+ *
18
+ * @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to
19
+ * <yournamespace>.servicebus.windows.net.
20
+ * @param eventHubName - The event hub name.
21
+ * @param consumerGroup - The consumer group name.
22
+ * @param options - A set of options that can be specified to influence the behavior of this method.
23
+ * - `abortSignal`: A signal used to request operation cancellation.
24
+ * - `tracingOptions`: Options for configuring tracing.
25
+ * @returns Partition ownership details of all the partitions that have had an owner.
26
+ */
27
+ listOwnership(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string, options?: OperationOptions): Promise<PartitionOwnership[]>;
28
+ /**
29
+ * Claim ownership of a list of partitions. This will return the list of partitions that were
30
+ * successfully claimed.
31
+ *
32
+ * @param partitionOwnership - The list of partition ownership this instance is claiming to own.
33
+ * @param options - A set of options that can be specified to influence the behavior of this method.
34
+ * - `abortSignal`: A signal used to request operation cancellation.
35
+ * - `tracingOptions`: Options for configuring tracing.
36
+ * @returns A list partitions this instance successfully claimed ownership.
37
+ */
38
+ claimOwnership(partitionOwnership: PartitionOwnership[], options?: OperationOptions): Promise<PartitionOwnership[]>;
39
+ /**
40
+ * Lists all the checkpoints in a data store for a given namespace, eventhub and consumer group.
41
+ *
42
+ * @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to
43
+ * <yournamespace>.servicebus.windows.net.
44
+ * @param eventHubName - The event hub name.
45
+ * @param consumerGroup - The consumer group name.
46
+ * @param options - A set of options that can be specified to influence the behavior of this method.
47
+ * - `abortSignal`: A signal used to request operation cancellation.
48
+ * - `tracingOptions`: Options for configuring tracing.
49
+ */
50
+ listCheckpoints(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string, options?: OperationOptions): Promise<Checkpoint[]>;
51
+ /**
52
+ * Updates the checkpoint in the data store for a partition.
53
+ *
54
+ * @param checkpoint - The checkpoint.
55
+ * @param options - A set of options that can be specified to influence the behavior of this method.
56
+ * - `abortSignal`: A signal used to request operation cancellation.
57
+ * - `tracingOptions`: Options for configuring tracing.
58
+ * @returns The new etag on successful update.
59
+ */
60
+ updateCheckpoint(checkpoint: Checkpoint, options?: OperationOptions): Promise<void>;
61
+ private static getBlobPrefix;
62
+ private _setBlobMetadata;
63
+ }
64
+ /**
65
+ * @internal
66
+ */
67
+ export declare function parseIntOrThrow(blobName: string, fieldName: string, numStr: string | undefined): number;
68
+ //# sourceMappingURL=blobCheckpointStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blobCheckpointStore.d.ts","sourceRoot":"","sources":["../../src/blobCheckpointStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE;;GAEG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,gBAAgB,CAAsB;IAE9C;;;OAGG;gBACS,eAAe,EAAE,mBAAmB;IAGhD;;;;;;;;;;;;;OAaG;IACG,aAAa,CACjB,uBAAuB,EAAE,MAAM,EAC/B,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAoDhC;;;;;;;;;OASG;IACG,cAAc,CAClB,kBAAkB,EAAE,kBAAkB,EAAE,EACxC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAiDhC;;;;;;;;;;OAUG;IACG,eAAe,CACnB,uBAAuB,EAAE,MAAM,EAC/B,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,UAAU,EAAE,CAAC;IA+CxB;;;;;;;;OAQG;IACG,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAwC7F,OAAO,CAAC,MAAM,CAAC,aAAa;YAoBd,gBAAgB;CA+C/B;AAUD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,MAAM,CAcR"}