@azure/event-hubs 5.8.0-beta.1 → 5.8.0
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.
- package/CHANGELOG.md +35 -0
- package/README.md +47 -0
- package/dist/index.js +213 -289
- package/dist/index.js.map +1 -1
- package/dist-esm/src/batchingPartitionChannel.js +19 -13
- package/dist-esm/src/batchingPartitionChannel.js.map +1 -1
- package/dist-esm/src/connectionContext.js.map +1 -1
- package/dist-esm/src/dataTransformer.js +1 -1
- package/dist-esm/src/dataTransformer.js.map +1 -1
- package/dist-esm/src/diagnostics/instrumentEventData.js +7 -7
- package/dist-esm/src/diagnostics/instrumentEventData.js.map +1 -1
- package/dist-esm/src/diagnostics/tracing.js +21 -82
- package/dist-esm/src/diagnostics/tracing.js.map +1 -1
- package/dist-esm/src/eventDataAdapter.js +9 -5
- package/dist-esm/src/eventDataAdapter.js.map +1 -1
- package/dist-esm/src/eventDataBatch.js +0 -2
- package/dist-esm/src/eventDataBatch.js.map +1 -1
- package/dist-esm/src/eventHubBufferedProducerClient.js +41 -8
- package/dist-esm/src/eventHubBufferedProducerClient.js.map +1 -1
- package/dist-esm/src/eventHubProducerClient.js +28 -52
- package/dist-esm/src/eventHubProducerClient.js.map +1 -1
- package/dist-esm/src/eventHubReceiver.js.map +1 -1
- package/dist-esm/src/eventHubSender.js +1 -1
- package/dist-esm/src/eventHubSender.js.map +1 -1
- package/dist-esm/src/eventProcessor.js.map +1 -1
- package/dist-esm/src/impl/partitionAssigner.js +1 -1
- package/dist-esm/src/impl/partitionAssigner.js.map +1 -1
- package/dist-esm/src/impl/{patitionKeyToIdMapper.js → partitionKeyToIdMapper.js} +10 -5
- package/dist-esm/src/impl/partitionKeyToIdMapper.js.map +1 -0
- package/dist-esm/src/linkEntity.js.map +1 -1
- package/dist-esm/src/managementClient.js +64 -79
- package/dist-esm/src/managementClient.js.map +1 -1
- package/dist-esm/src/partitionProcessor.js.map +1 -1
- package/dist-esm/src/partitionPump.js +13 -39
- package/dist-esm/src/partitionPump.js.map +1 -1
- package/dist-esm/src/pumpManager.js.map +1 -1
- package/dist-esm/src/receiveHandler.js.map +1 -1
- package/dist-esm/src/util/constants.js +1 -1
- package/dist-esm/src/util/constants.js.map +1 -1
- package/dist-esm/src/util/error.js +3 -3
- package/dist-esm/src/util/error.js.map +1 -1
- package/package.json +10 -10
- package/types/3.1/event-hubs.d.ts +18 -15
- package/types/latest/event-hubs.d.ts +18 -15
- package/types/latest/tsdoc-metadata.json +1 -1
- package/dist-esm/src/impl/patitionKeyToIdMapper.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
## 5.8.0 (2022-05-10)
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- The `enableIdempotentPartitions` flag has been renamed to `enableIdempotentRetries`
|
|
8
|
+
|
|
9
|
+
## 5.8.0-beta.3 (2022-04-05)
|
|
10
|
+
|
|
11
|
+
### Breaking Changes
|
|
12
|
+
- `MessageWithMetadata` has been renamed to `MessageContent`.
|
|
13
|
+
- `MessageContent`'s `body` has been renamed to `data`.
|
|
14
|
+
- `MessageAdapter`'s `consumeMessage` and `produceMessage` have been renamed to `consume` and `produce`.
|
|
15
|
+
|
|
16
|
+
### Bugs Fixed
|
|
17
|
+
- The Uint8Array payload was being stringified first before it gets sent which caused the receiver to treat it as an object instead of a Uint8Array. This is now fixed and Uint8Array is being treated the same as a Buffer.
|
|
18
|
+
- The hashing algorithm used to map partition keys to IDs in the buffered producer is no longer sensitive to the endianness of the local machine [Issue #21190](https://github.com/Azure/azure-sdk-for-js/issues/21190).
|
|
19
|
+
|
|
20
|
+
### Other Changes
|
|
21
|
+
|
|
22
|
+
- Updated our `@azure/core-tracing` dependency to the latest version (1.0.0). There are no changes from the previous beta; however, please see below for changes from the previous minor version:
|
|
23
|
+
- Notable changes include Removal of `@opentelemetry/api` as a transitive dependency and ensuring that the active context is properly propagated.
|
|
24
|
+
- Customers who would like to continue using OpenTelemetry driven tracing should visit our [OpenTelemetry Instrumentation](https://www.npmjs.com/package/@azure/opentelemetry-instrumentation-azure-sdk) package for instructions.
|
|
25
|
+
|
|
26
|
+
## 5.8.0-beta.2 (2022-03-11)
|
|
27
|
+
|
|
28
|
+
### Bugs Fixed
|
|
29
|
+
|
|
30
|
+
- `createEventDataAdapter` is updated so that `consumeMessage` returns the original binary payload instead of the Buffer representation of it.
|
|
31
|
+
|
|
32
|
+
### Other Changes
|
|
33
|
+
|
|
34
|
+
- Updated our `@azure/core-tracing` dependency to the latest version (1.0.0-preview.14)
|
|
35
|
+
- Notable changes include Removal of `@opentelemetry/api` as a transitive dependency and ensuring that the active context is properly propagated.
|
|
36
|
+
- Customers who would like to continue using OpenTelemetry driven tracing should visit our [OpenTelemetry Instrumentation](https://www.npmjs.com/package/@azure/opentelemetry-instrumentation-azure-sdk) package for instructions.
|
|
37
|
+
|
|
3
38
|
## 5.8.0-beta.1 (2022-02-08)
|
|
4
39
|
|
|
5
40
|
### Features Added
|
package/README.md
CHANGED
|
@@ -50,6 +50,53 @@ npm install @types/node
|
|
|
50
50
|
|
|
51
51
|
You also need to enable `compilerOptions.allowSyntheticDefaultImports` in your tsconfig.json. Note that if you have enabled `compilerOptions.esModuleInterop`, `allowSyntheticDefaultImports` is enabled by default. See [TypeScript's compiler options handbook](https://www.typescriptlang.org/docs/handbook/compiler-options.html) for more information.
|
|
52
52
|
|
|
53
|
+
### JavaScript Bundle
|
|
54
|
+
|
|
55
|
+
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
|
|
56
|
+
|
|
57
|
+
In addition to what is described there, this library also needs additional polyfills for the following NodeJS core built-in modules in order to work properly in the browsers:
|
|
58
|
+
|
|
59
|
+
- `buffer`
|
|
60
|
+
- `os`
|
|
61
|
+
- `path`
|
|
62
|
+
- `process`
|
|
63
|
+
|
|
64
|
+
For example, if you are using Webpack v5, you can install the following dev dependencies
|
|
65
|
+
|
|
66
|
+
- `npm install --save-dev buffer os-browserify path-browserify process`
|
|
67
|
+
|
|
68
|
+
then add the following into your webpack.config.js
|
|
69
|
+
|
|
70
|
+
```diff
|
|
71
|
+
const path = require("path");
|
|
72
|
+
+const webpack = require("webpack");
|
|
73
|
+
|
|
74
|
+
module.exports = {
|
|
75
|
+
entry: "./src/index.ts",
|
|
76
|
+
@@ -12,8 +13,21 @@ module.exports = {
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
+ plugins: [
|
|
81
|
+
+ new webpack.ProvidePlugin({
|
|
82
|
+
+ process: "process/browser",
|
|
83
|
+
+ }),
|
|
84
|
+
+ new webpack.ProvidePlugin({
|
|
85
|
+
+ Buffer: ["buffer", "Buffer"],
|
|
86
|
+
+ }),
|
|
87
|
+
+ ],
|
|
88
|
+
resolve: {
|
|
89
|
+
extensions: [".ts", ".js"],
|
|
90
|
+
+ fallback: {
|
|
91
|
+
+ buffer: require.resolve("buffer/"),
|
|
92
|
+
+ os: require.resolve("os-browserify"),
|
|
93
|
+
+ path: require.resolve("path-browserify"),
|
|
94
|
+
+ },
|
|
95
|
+
},
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Please consult the documentation of your favorite bundler for more information on using polyfills.
|
|
99
|
+
|
|
53
100
|
### Authenticate the client
|
|
54
101
|
|
|
55
102
|
Interaction with Event Hubs starts with either an instance of the
|