@azure/event-hubs 5.7.0 → 5.8.0-alpha.20220210.2

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 (82) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/README.md +1 -1
  3. package/dist/index.js +3966 -2755
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/src/batchingPartitionChannel.js +241 -0
  6. package/dist-esm/src/batchingPartitionChannel.js.map +1 -0
  7. package/dist-esm/src/connectionContext.js +13 -13
  8. package/dist-esm/src/connectionContext.js.map +1 -1
  9. package/dist-esm/src/dataTransformer.js +5 -5
  10. package/dist-esm/src/dataTransformer.js.map +1 -1
  11. package/dist-esm/src/diagnostics/instrumentEventData.js +34 -16
  12. package/dist-esm/src/diagnostics/instrumentEventData.js.map +1 -1
  13. package/dist-esm/src/diagnostics/tracing.js +7 -7
  14. package/dist-esm/src/diagnostics/tracing.js.map +1 -1
  15. package/dist-esm/src/eventData.js +65 -5
  16. package/dist-esm/src/eventData.js.map +1 -1
  17. package/dist-esm/src/eventDataAdapter.js +31 -0
  18. package/dist-esm/src/eventDataAdapter.js.map +1 -0
  19. package/dist-esm/src/eventDataBatch.js +85 -25
  20. package/dist-esm/src/eventDataBatch.js.map +1 -1
  21. package/dist-esm/src/eventHubBufferedProducerClient.js +279 -0
  22. package/dist-esm/src/eventHubBufferedProducerClient.js.map +1 -0
  23. package/dist-esm/src/eventHubConsumerClient.js +10 -11
  24. package/dist-esm/src/eventHubConsumerClient.js.map +1 -1
  25. package/dist-esm/src/eventHubConsumerClientModels.js.map +1 -1
  26. package/dist-esm/src/eventHubProducerClient.js +137 -50
  27. package/dist-esm/src/eventHubProducerClient.js.map +1 -1
  28. package/dist-esm/src/eventHubReceiver.js +18 -25
  29. package/dist-esm/src/eventHubReceiver.js.map +1 -1
  30. package/dist-esm/src/eventHubSender.js +218 -61
  31. package/dist-esm/src/eventHubSender.js.map +1 -1
  32. package/dist-esm/src/eventPosition.js +3 -3
  33. package/dist-esm/src/eventPosition.js.map +1 -1
  34. package/dist-esm/src/eventProcessor.js +8 -8
  35. package/dist-esm/src/eventProcessor.js.map +1 -1
  36. package/dist-esm/src/eventhubConnectionConfig.js +1 -1
  37. package/dist-esm/src/eventhubConnectionConfig.js.map +1 -1
  38. package/dist-esm/src/impl/awaitableQueue.js +46 -0
  39. package/dist-esm/src/impl/awaitableQueue.js.map +1 -0
  40. package/dist-esm/src/impl/partitionAssigner.js +54 -0
  41. package/dist-esm/src/impl/partitionAssigner.js.map +1 -0
  42. package/dist-esm/src/impl/patitionKeyToIdMapper.js +106 -0
  43. package/dist-esm/src/impl/patitionKeyToIdMapper.js.map +1 -0
  44. package/dist-esm/src/inMemoryCheckpointStore.js.map +1 -1
  45. package/dist-esm/src/index.js +3 -1
  46. package/dist-esm/src/index.js.map +1 -1
  47. package/dist-esm/src/linkEntity.js +7 -11
  48. package/dist-esm/src/linkEntity.js.map +1 -1
  49. package/dist-esm/src/loadBalancerStrategies/balancedStrategy.js.map +1 -1
  50. package/dist-esm/src/loadBalancerStrategies/greedyStrategy.js.map +1 -1
  51. package/dist-esm/src/loadBalancerStrategies/loadBalancingStrategy.js +2 -3
  52. package/dist-esm/src/loadBalancerStrategies/loadBalancingStrategy.js.map +1 -1
  53. package/dist-esm/src/loadBalancerStrategies/unbalancedStrategy.js.map +1 -1
  54. package/dist-esm/src/log.js +1 -1
  55. package/dist-esm/src/log.js.map +1 -1
  56. package/dist-esm/src/managementClient.js +21 -25
  57. package/dist-esm/src/managementClient.js.map +1 -1
  58. package/dist-esm/src/models/private.js +1 -1
  59. package/dist-esm/src/models/private.js.map +1 -1
  60. package/dist-esm/src/models/public.js.map +1 -1
  61. package/dist-esm/src/partitionProcessor.js +1 -1
  62. package/dist-esm/src/partitionProcessor.js.map +1 -1
  63. package/dist-esm/src/partitionPump.js +9 -9
  64. package/dist-esm/src/partitionPump.js.map +1 -1
  65. package/dist-esm/src/pumpManager.js +1 -9
  66. package/dist-esm/src/pumpManager.js.map +1 -1
  67. package/dist-esm/src/receiveHandler.js.map +1 -1
  68. package/dist-esm/src/util/connectionStringUtils.js +1 -1
  69. package/dist-esm/src/util/connectionStringUtils.js.map +1 -1
  70. package/dist-esm/src/util/constants.js +15 -2
  71. package/dist-esm/src/util/constants.js.map +1 -1
  72. package/dist-esm/src/util/delayWithoutThrow.js.map +1 -1
  73. package/dist-esm/src/util/error.js +68 -0
  74. package/dist-esm/src/util/error.js.map +1 -1
  75. package/dist-esm/src/util/getPromiseParts.js +20 -0
  76. package/dist-esm/src/util/getPromiseParts.js.map +1 -0
  77. package/dist-esm/src/util/typeGuards.js +1 -1
  78. package/dist-esm/src/util/typeGuards.js.map +1 -1
  79. package/package.json +35 -34
  80. package/types/3.1/event-hubs.d.ts +449 -4
  81. package/types/latest/event-hubs.d.ts +449 -6
  82. package/types/latest/tsdoc-metadata.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,17 +1,43 @@
1
1
  # Release History
2
2
 
3
- ## 5.7.0 (2022-02-08)
3
+ ## 5.8.0-beta.2 (Unreleased)
4
4
 
5
5
  ### Features Added
6
6
 
7
+ ### Breaking Changes
8
+
9
+ ### Bugs Fixed
10
+
11
+ ### Other Changes
12
+
13
+ ## 5.8.0-beta.1 (2022-02-08)
14
+
15
+ ### Features Added
16
+
17
+ - A new function `createEventDataAdapter` is exported that can convert an `EventData` to a simple message with `body` and `contentType` fields. This adapter can be used with the Avro encoder in `@azure/schema-registry-avro` starting from version 1.0.0-beta.6 to create `EventData` messages with Avro-encoded bodies.
18
+
19
+ - When publishing events to Event Hubs, timeouts or other transient failures may introduce ambiguity into the understanding of whether a batch of events was received by the service. To assist in this scenario, the option to publish events idempotently has been added to `EventHubBufferedProducerClient`. The functionality can be enabled by setting the `enableIdempotentPartitions` client option to `true`. If enabled, retries during publishing will attempt to avoid duplication with a minor cost to throughput. Duplicates are still possible but the chance of them occurring is much lower when idempotent retries are enabled. [PR #20156](https://github.com/Azure/azure-sdk-for-js/pull/20156)
20
+
21
+ ## 5.7.0-beta.1 (2021-11-12)
22
+
23
+ ### Features Added
24
+
25
+ - Added `EventHubBufferedProducerClient` with functionality to manage batching, concurrency, and sending of events implicitly. This abstracts the complexity away from applications regarding publishing events in an optimal fashion. See issue [#17699](https://github.com/Azure/azure-sdk-for-js/issues/17699) for more details.
7
26
  - Added `skipParsingBodyAsJson` optional parameter to `EventHubConsumerClient.subscribe` method. When set to `true` it will disable the client from running `JSON.parse()` on the message body when receiving the message. Not applicable if the message was sent with AMQP body type `value` or `sequence`.
8
27
 
28
+ ### Other Changes
29
+
30
+ - Prevent empty spans from being created when tracing is disabled. Fixes issue [#14063](https://github.com/Azure/azure-sdk-for-js/issues/14063)
31
+ - Updated to use the version `1.0.0-preview.13` of the `@azure/core-tracing` dependency.
32
+
9
33
  ## 5.6.0 (2021-07-07)
10
34
 
11
35
  ### Features Added
12
36
 
13
37
  - With the dropping of support for Node.js versions that are no longer in LTS, the dependency on `@types/node` has been updated to version 12. Read our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
14
38
 
39
+ - Updated our internal core package dependencies to their latest versions in order to add support for Opentelemetry 1.0.0 which is compatible with the latest versions of our other client libraries.
40
+ - Changed TS compilation target to ES2017 in order to produce smaller bundles and use more native platform features
15
41
  - Adds the `contentType`, `correlationId`, and `messageId` AMQP properties as top-level fields on `EventData` and `ReceivedEventData`.
16
42
 
17
43
  - Enable encoding the body of a message to the 'value' or 'sequence' sections (via AmqpAnnotatedMessage.bodyType). Using this encoding is not required but does allow you to take advantage of native AMQP serialization for supported primitives or sequences.
package/README.md CHANGED
@@ -40,7 +40,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
40
40
  - An [Azure subscription](https://azure.microsoft.com/free/)
41
41
  - An [Event Hubs Namespace](https://docs.microsoft.com/azure/event-hubs/)
42
42
 
43
- #### Configure Typescript
43
+ #### Configure TypeScript
44
44
 
45
45
  TypeScript users need to have Node type definitions installed:
46
46