@azure/event-hubs 6.0.2-alpha.20251014.1 → 6.0.2-alpha.20251021.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.
- package/dist/browser/batchingPartitionChannel.d.ts.map +1 -1
- package/dist/browser/batchingPartitionChannel.js +2 -1
- package/dist/browser/batchingPartitionChannel.js.map +1 -1
- package/dist/browser/connectionContext.d.ts.map +1 -1
- package/dist/browser/connectionContext.js +10 -4
- package/dist/browser/connectionContext.js.map +1 -1
- package/dist/browser/eventHubBufferedProducerClient.d.ts.map +1 -1
- package/dist/browser/eventHubBufferedProducerClient.js +2 -1
- package/dist/browser/eventHubBufferedProducerClient.js.map +1 -1
- package/dist/browser/eventHubConsumerClient.d.ts.map +1 -1
- package/dist/browser/eventHubConsumerClient.js +3 -6
- package/dist/browser/eventHubConsumerClient.js.map +1 -1
- package/dist/browser/eventHubProducerClient.d.ts.map +1 -1
- package/dist/browser/eventHubProducerClient.js +3 -6
- package/dist/browser/eventHubProducerClient.js.map +1 -1
- package/dist/browser/eventHubSender.d.ts.map +1 -1
- package/dist/browser/eventHubSender.js +6 -4
- package/dist/browser/eventHubSender.js.map +1 -1
- package/dist/browser/partitionReceiver.js +4 -4
- package/dist/browser/partitionReceiver.js.map +1 -1
- package/dist/browser/util/timerLoop.d.ts.map +1 -1
- package/dist/browser/util/timerLoop.js +12 -5
- package/dist/browser/util/timerLoop.js.map +1 -1
- package/dist/commonjs/batchingPartitionChannel.d.ts.map +1 -1
- package/dist/commonjs/batchingPartitionChannel.js +2 -1
- package/dist/commonjs/batchingPartitionChannel.js.map +1 -1
- package/dist/commonjs/connectionContext.d.ts.map +1 -1
- package/dist/commonjs/connectionContext.js +10 -4
- package/dist/commonjs/connectionContext.js.map +1 -1
- package/dist/commonjs/eventHubBufferedProducerClient.d.ts.map +1 -1
- package/dist/commonjs/eventHubBufferedProducerClient.js +2 -1
- package/dist/commonjs/eventHubBufferedProducerClient.js.map +1 -1
- package/dist/commonjs/eventHubConsumerClient.d.ts.map +1 -1
- package/dist/commonjs/eventHubConsumerClient.js +3 -6
- package/dist/commonjs/eventHubConsumerClient.js.map +1 -1
- package/dist/commonjs/eventHubProducerClient.d.ts.map +1 -1
- package/dist/commonjs/eventHubProducerClient.js +3 -6
- package/dist/commonjs/eventHubProducerClient.js.map +1 -1
- package/dist/commonjs/eventHubSender.d.ts.map +1 -1
- package/dist/commonjs/eventHubSender.js +6 -4
- package/dist/commonjs/eventHubSender.js.map +1 -1
- package/dist/commonjs/partitionReceiver.js +4 -4
- package/dist/commonjs/partitionReceiver.js.map +1 -1
- package/dist/commonjs/util/timerLoop.d.ts.map +1 -1
- package/dist/commonjs/util/timerLoop.js +12 -5
- package/dist/commonjs/util/timerLoop.js.map +1 -1
- package/dist/esm/batchingPartitionChannel.d.ts.map +1 -1
- package/dist/esm/batchingPartitionChannel.js +2 -1
- package/dist/esm/batchingPartitionChannel.js.map +1 -1
- package/dist/esm/connectionContext.d.ts.map +1 -1
- package/dist/esm/connectionContext.js +10 -4
- package/dist/esm/connectionContext.js.map +1 -1
- package/dist/esm/eventHubBufferedProducerClient.d.ts.map +1 -1
- package/dist/esm/eventHubBufferedProducerClient.js +2 -1
- package/dist/esm/eventHubBufferedProducerClient.js.map +1 -1
- package/dist/esm/eventHubConsumerClient.d.ts.map +1 -1
- package/dist/esm/eventHubConsumerClient.js +3 -6
- package/dist/esm/eventHubConsumerClient.js.map +1 -1
- package/dist/esm/eventHubProducerClient.d.ts.map +1 -1
- package/dist/esm/eventHubProducerClient.js +3 -6
- package/dist/esm/eventHubProducerClient.js.map +1 -1
- package/dist/esm/eventHubSender.d.ts.map +1 -1
- package/dist/esm/eventHubSender.js +6 -4
- package/dist/esm/eventHubSender.js.map +1 -1
- package/dist/esm/partitionReceiver.js +4 -4
- package/dist/esm/partitionReceiver.js.map +1 -1
- package/dist/esm/util/timerLoop.d.ts.map +1 -1
- package/dist/esm/util/timerLoop.js +12 -5
- package/dist/esm/util/timerLoop.js.map +1 -1
- package/dist/react-native/batchingPartitionChannel.d.ts +94 -0
- package/dist/react-native/batchingPartitionChannel.d.ts.map +1 -0
- package/dist/react-native/batchingPartitionChannel.js +255 -0
- package/dist/react-native/batchingPartitionChannel.js.map +1 -0
- package/dist/react-native/connectionContext.d.ts +108 -0
- package/dist/react-native/connectionContext.d.ts.map +1 -0
- package/dist/react-native/connectionContext.js +310 -0
- package/dist/react-native/connectionContext.js.map +1 -0
- package/dist/react-native/dataTransformer.d.ts +53 -0
- package/dist/react-native/dataTransformer.d.ts.map +1 -0
- package/dist/react-native/dataTransformer.js +133 -0
- package/dist/react-native/dataTransformer.js.map +1 -0
- package/dist/react-native/diagnostics/instrumentEventData.d.ts +28 -0
- package/dist/react-native/diagnostics/instrumentEventData.d.ts.map +1 -0
- package/dist/react-native/diagnostics/instrumentEventData.js +67 -0
- package/dist/react-native/diagnostics/instrumentEventData.js.map +1 -0
- package/dist/react-native/diagnostics/tracing.d.ts +19 -0
- package/dist/react-native/diagnostics/tracing.d.ts.map +1 -0
- package/dist/react-native/diagnostics/tracing.js +40 -0
- package/dist/react-native/diagnostics/tracing.js.map +1 -0
- package/dist/react-native/eventData.d.ts +295 -0
- package/dist/react-native/eventData.d.ts.map +1 -0
- package/dist/react-native/eventData.js +247 -0
- package/dist/react-native/eventData.js.map +1 -0
- package/dist/react-native/eventDataAdapter.d.ts +69 -0
- package/dist/react-native/eventDataAdapter.d.ts.map +1 -0
- package/dist/react-native/eventDataAdapter.js +38 -0
- package/dist/react-native/eventDataAdapter.js.map +1 -0
- package/dist/react-native/eventDataBatch.d.ts +225 -0
- package/dist/react-native/eventDataBatch.d.ts.map +1 -0
- package/dist/react-native/eventDataBatch.js +301 -0
- package/dist/react-native/eventDataBatch.js.map +1 -0
- package/dist/react-native/eventHubBufferedProducerClient.d.ts +323 -0
- package/dist/react-native/eventHubBufferedProducerClient.d.ts.map +1 -0
- package/dist/react-native/eventHubBufferedProducerClient.js +301 -0
- package/dist/react-native/eventHubBufferedProducerClient.js.map +1 -0
- package/dist/react-native/eventHubConsumerClient.d.ts +293 -0
- package/dist/react-native/eventHubConsumerClient.d.ts.map +1 -0
- package/dist/react-native/eventHubConsumerClient.js +336 -0
- package/dist/react-native/eventHubConsumerClient.js.map +1 -0
- package/dist/react-native/eventHubConsumerClientModels.d.ts +218 -0
- package/dist/react-native/eventHubConsumerClientModels.d.ts.map +1 -0
- package/dist/react-native/eventHubConsumerClientModels.js +4 -0
- package/dist/react-native/eventHubConsumerClientModels.js.map +1 -0
- package/dist/react-native/eventHubProducerClient.d.ts +299 -0
- package/dist/react-native/eventHubProducerClient.d.ts.map +1 -0
- package/dist/react-native/eventHubProducerClient.js +366 -0
- package/dist/react-native/eventHubProducerClient.js.map +1 -0
- package/dist/react-native/eventHubSender.d.ts +227 -0
- package/dist/react-native/eventHubSender.d.ts.map +1 -0
- package/dist/react-native/eventHubSender.js +626 -0
- package/dist/react-native/eventHubSender.js.map +1 -0
- package/dist/react-native/eventPosition.d.ts +73 -0
- package/dist/react-native/eventPosition.d.ts.map +1 -0
- package/dist/react-native/eventPosition.js +121 -0
- package/dist/react-native/eventPosition.js.map +1 -0
- package/dist/react-native/eventProcessor.d.ts +232 -0
- package/dist/react-native/eventProcessor.d.ts.map +1 -0
- package/dist/react-native/eventProcessor.js +389 -0
- package/dist/react-native/eventProcessor.js.map +1 -0
- package/dist/react-native/eventhubConnectionConfig.d.ts +96 -0
- package/dist/react-native/eventhubConnectionConfig.d.ts.map +1 -0
- package/dist/react-native/eventhubConnectionConfig.js +98 -0
- package/dist/react-native/eventhubConnectionConfig.js.map +1 -0
- package/dist/react-native/impl/awaitableQueue.d.ts +25 -0
- package/dist/react-native/impl/awaitableQueue.d.ts.map +1 -0
- package/dist/react-native/impl/awaitableQueue.js +51 -0
- package/dist/react-native/impl/awaitableQueue.js.map +1 -0
- package/dist/react-native/impl/partitionAssigner.d.ts +29 -0
- package/dist/react-native/impl/partitionAssigner.d.ts.map +1 -0
- package/dist/react-native/impl/partitionAssigner.js +52 -0
- package/dist/react-native/impl/partitionAssigner.js.map +1 -0
- package/dist/react-native/impl/partitionGate.d.ts +27 -0
- package/dist/react-native/impl/partitionGate.d.ts.map +1 -0
- package/dist/react-native/impl/partitionGate.js +38 -0
- package/dist/react-native/impl/partitionGate.js.map +1 -0
- package/dist/react-native/impl/partitionKeyToIdMapper.d.ts +6 -0
- package/dist/react-native/impl/partitionKeyToIdMapper.d.ts.map +1 -0
- package/dist/react-native/impl/partitionKeyToIdMapper.js +111 -0
- package/dist/react-native/impl/partitionKeyToIdMapper.js.map +1 -0
- package/dist/react-native/inMemoryCheckpointStore.d.ts +44 -0
- package/dist/react-native/inMemoryCheckpointStore.d.ts.map +1 -0
- package/dist/react-native/inMemoryCheckpointStore.js +94 -0
- package/dist/react-native/inMemoryCheckpointStore.js.map +1 -0
- package/dist/react-native/index.d.ts +21 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +12 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/loadBalancerStrategies/balancedStrategy.d.ts +30 -0
- package/dist/react-native/loadBalancerStrategies/balancedStrategy.d.ts.map +1 -0
- package/dist/react-native/loadBalancerStrategies/balancedStrategy.js +40 -0
- package/dist/react-native/loadBalancerStrategies/balancedStrategy.js.map +1 -0
- package/dist/react-native/loadBalancerStrategies/greedyStrategy.d.ts +24 -0
- package/dist/react-native/loadBalancerStrategies/greedyStrategy.d.ts.map +1 -0
- package/dist/react-native/loadBalancerStrategies/greedyStrategy.js +29 -0
- package/dist/react-native/loadBalancerStrategies/greedyStrategy.js.map +1 -0
- package/dist/react-native/loadBalancerStrategies/loadBalancingStrategy.d.ts +28 -0
- package/dist/react-native/loadBalancerStrategies/loadBalancingStrategy.d.ts.map +1 -0
- package/dist/react-native/loadBalancerStrategies/loadBalancingStrategy.js +245 -0
- package/dist/react-native/loadBalancerStrategies/loadBalancingStrategy.js.map +1 -0
- package/dist/react-native/loadBalancerStrategies/unbalancedStrategy.d.ts +20 -0
- package/dist/react-native/loadBalancerStrategies/unbalancedStrategy.d.ts.map +1 -0
- package/dist/react-native/loadBalancerStrategies/unbalancedStrategy.js +22 -0
- package/dist/react-native/loadBalancerStrategies/unbalancedStrategy.js.map +1 -0
- package/dist/react-native/logger.d.ts +37 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +56 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/managementClient.d.ts +145 -0
- package/dist/react-native/managementClient.d.ts.map +1 -0
- package/dist/react-native/managementClient.js +305 -0
- package/dist/react-native/managementClient.js.map +1 -0
- package/dist/react-native/models/private.d.ts +185 -0
- package/dist/react-native/models/private.d.ts.map +1 -0
- package/dist/react-native/models/private.js +4 -0
- package/dist/react-native/models/private.js.map +1 -0
- package/dist/react-native/models/public.d.ts +240 -0
- package/dist/react-native/models/public.d.ts.map +1 -0
- package/dist/react-native/models/public.js +18 -0
- package/dist/react-native/models/public.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/partitionProcessor.d.ts +134 -0
- package/dist/react-native/partitionProcessor.d.ts.map +1 -0
- package/dist/react-native/partitionProcessor.js +137 -0
- package/dist/react-native/partitionProcessor.js.map +1 -0
- package/dist/react-native/partitionPump.d.ts +38 -0
- package/dist/react-native/partitionPump.d.ts.map +1 -0
- package/dist/react-native/partitionPump.js +175 -0
- package/dist/react-native/partitionPump.js.map +1 -0
- package/dist/react-native/partitionReceiver.d.ts +82 -0
- package/dist/react-native/partitionReceiver.d.ts.map +1 -0
- package/dist/react-native/partitionReceiver.js +335 -0
- package/dist/react-native/partitionReceiver.js.map +1 -0
- package/dist/react-native/pumpManager.d.ts +72 -0
- package/dist/react-native/pumpManager.d.ts.map +1 -0
- package/dist/react-native/pumpManager.js +120 -0
- package/dist/react-native/pumpManager.js.map +1 -0
- package/dist/react-native/util/connectionStringUtils.d.ts +52 -0
- package/dist/react-native/util/connectionStringUtils.d.ts.map +1 -0
- package/dist/react-native/util/connectionStringUtils.js +48 -0
- package/dist/react-native/util/connectionStringUtils.js.map +1 -0
- package/dist/react-native/util/constants.d.ts +25 -0
- package/dist/react-native/util/constants.d.ts.map +1 -0
- package/dist/react-native/util/constants.js +27 -0
- package/dist/react-native/util/constants.js.map +1 -0
- package/dist/react-native/util/delayWithoutThrow.d.ts +8 -0
- package/dist/react-native/util/delayWithoutThrow.d.ts.map +1 -0
- package/dist/react-native/util/delayWithoutThrow.js +17 -0
- package/dist/react-native/util/delayWithoutThrow.js.map +1 -0
- package/dist/react-native/util/error.d.ts +39 -0
- package/dist/react-native/util/error.d.ts.map +1 -0
- package/dist/react-native/util/error.js +103 -0
- package/dist/react-native/util/error.js.map +1 -0
- package/dist/react-native/util/getPromiseParts.d.ts +10 -0
- package/dist/react-native/util/getPromiseParts.d.ts.map +1 -0
- package/dist/react-native/util/getPromiseParts.js +20 -0
- package/dist/react-native/util/getPromiseParts.js.map +1 -0
- package/dist/react-native/util/operationOptions.d.ts +16 -0
- package/dist/react-native/util/operationOptions.d.ts.map +1 -0
- package/dist/react-native/util/operationOptions.js +4 -0
- package/dist/react-native/util/operationOptions.js.map +1 -0
- package/dist/react-native/util/parseEndpoint.d.ts +11 -0
- package/dist/react-native/util/parseEndpoint.d.ts.map +1 -0
- package/dist/react-native/util/parseEndpoint.js +17 -0
- package/dist/react-native/util/parseEndpoint.js.map +1 -0
- package/dist/react-native/util/retries.d.ts +6 -0
- package/dist/react-native/util/retries.d.ts.map +1 -0
- package/dist/react-native/util/retries.js +13 -0
- package/dist/react-native/util/retries.js.map +1 -0
- package/dist/react-native/util/runtimeInfo-react-native.d.mts.map +1 -0
- package/dist/react-native/util/runtimeInfo-react-native.mjs.map +1 -0
- package/dist/react-native/util/runtimeInfo.d.ts +6 -0
- package/dist/react-native/util/runtimeInfo.js +20 -0
- package/dist/react-native/util/timerLoop.d.ts +26 -0
- package/dist/react-native/util/timerLoop.d.ts.map +1 -0
- package/dist/react-native/util/timerLoop.js +34 -0
- package/dist/react-native/util/timerLoop.js.map +1 -0
- package/dist/react-native/util/typeGuards.d.ts +8 -0
- package/dist/react-native/util/typeGuards.d.ts.map +1 -0
- package/dist/react-native/util/typeGuards.js +12 -0
- package/dist/react-native/util/typeGuards.js.map +1 -0
- package/dist/react-native/util/utils.d.ts +7 -0
- package/dist/react-native/util/utils.d.ts.map +1 -0
- package/dist/react-native/util/utils.js +13 -0
- package/dist/react-native/util/utils.js.map +1 -0
- package/dist/react-native/withAuth.d.ts +25 -0
- package/dist/react-native/withAuth.d.ts.map +1 -0
- package/dist/react-native/withAuth.js +84 -0
- package/dist/react-native/withAuth.js.map +1 -0
- package/package.json +16 -11
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import type { RetryOptions } from "@azure/core-amqp";
|
|
2
|
+
import type { EventData } from "./eventData.js";
|
|
3
|
+
import type { EventDataBatch } from "./eventDataBatch.js";
|
|
4
|
+
import type { AbortSignalLike } from "@azure/abort-controller";
|
|
5
|
+
import type { ConnectionContext } from "./connectionContext.js";
|
|
6
|
+
import type { EventHubProducerOptions, IdempotentLinkProperties } from "./models/private.js";
|
|
7
|
+
import type { SendOptions } from "./models/public.js";
|
|
8
|
+
import type { PartitionPublishingOptions, PartitionPublishingProperties } from "./models/private.js";
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export interface EventHubSenderOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether or not the sender should enable idempotent publishing to Event Hub partitions.
|
|
15
|
+
*/
|
|
16
|
+
enableIdempotentProducer: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The EventHub partition id to which the sender wants to send the event data.
|
|
19
|
+
*/
|
|
20
|
+
partitionId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The set of options that can be specified to influence publishing behavior
|
|
23
|
+
* specific to a partition.
|
|
24
|
+
*/
|
|
25
|
+
partitionPublishingOptions?: PartitionPublishingOptions;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Describes the EventHubSender that will send event data to EventHub.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare class EventHubSender {
|
|
32
|
+
/**
|
|
33
|
+
* The unique lock name per connection that is used to acquire the
|
|
34
|
+
* lock for establishing a sender link by an entity on that connection.
|
|
35
|
+
*/
|
|
36
|
+
private readonly senderLock;
|
|
37
|
+
/**
|
|
38
|
+
* The handler function to handle errors that happen on the
|
|
39
|
+
* underlying sender.
|
|
40
|
+
*/
|
|
41
|
+
private readonly _onAmqpError;
|
|
42
|
+
/**
|
|
43
|
+
* The handler function to handle "sender_close" event
|
|
44
|
+
* that happens on the underlying sender.
|
|
45
|
+
*/
|
|
46
|
+
private readonly _onAmqpClose;
|
|
47
|
+
/**
|
|
48
|
+
* The message handler that will be set as the handler on
|
|
49
|
+
* the underlying rhea sender's session for the "session_error" event.
|
|
50
|
+
*/
|
|
51
|
+
private _onSessionError;
|
|
52
|
+
/**
|
|
53
|
+
* The message handler that will be set as the handler on
|
|
54
|
+
* the underlying rhea sender's session for the "session_close" event.
|
|
55
|
+
*/
|
|
56
|
+
private _onSessionClose;
|
|
57
|
+
/**
|
|
58
|
+
* The AMQP sender link.
|
|
59
|
+
*/
|
|
60
|
+
private _sender?;
|
|
61
|
+
/**
|
|
62
|
+
* The partition ID.
|
|
63
|
+
*/
|
|
64
|
+
private readonly partitionId?;
|
|
65
|
+
/**
|
|
66
|
+
* Indicates whether the sender is configured for idempotent publishing.
|
|
67
|
+
*/
|
|
68
|
+
private _isIdempotentProducer;
|
|
69
|
+
/**
|
|
70
|
+
* Indicates whether the sender has an in-flight send while idempotent
|
|
71
|
+
* publishing is enabled.
|
|
72
|
+
*/
|
|
73
|
+
private _hasPendingSend?;
|
|
74
|
+
/**
|
|
75
|
+
* A local copy of the PartitionPublishingProperties that can be mutated to
|
|
76
|
+
* keep track of the lastSequenceNumber used.
|
|
77
|
+
*/
|
|
78
|
+
private _localPublishingProperties?;
|
|
79
|
+
/**
|
|
80
|
+
* The user-provided set of options that can be specified to influence
|
|
81
|
+
* publishing behavior specific to a partition.
|
|
82
|
+
*/
|
|
83
|
+
private _userProvidedPublishingOptions?;
|
|
84
|
+
/**
|
|
85
|
+
* Indicates whether the link is in the process of connecting
|
|
86
|
+
* (establishing) itself. Default value: `false`.
|
|
87
|
+
*/
|
|
88
|
+
private isConnecting;
|
|
89
|
+
/**
|
|
90
|
+
* The unique name for the entity (mostly a guid).
|
|
91
|
+
*/
|
|
92
|
+
private readonly name;
|
|
93
|
+
/**
|
|
94
|
+
* The address in the following form:
|
|
95
|
+
* - `"<hubName>"`
|
|
96
|
+
* - `"<hubName>/Partitions/<partitionId>"`.
|
|
97
|
+
*/
|
|
98
|
+
private readonly address;
|
|
99
|
+
/**
|
|
100
|
+
* The token audience in the following form:
|
|
101
|
+
* - `"sb://<yournamespace>.servicebus.windows.net/<hubName>"`
|
|
102
|
+
* - `"sb://<yournamespace>.servicebus.windows.net/<hubName>/Partitions/<partitionId>"`.
|
|
103
|
+
*/
|
|
104
|
+
private readonly audience;
|
|
105
|
+
/**
|
|
106
|
+
* Provides relevant information about the amqp connection,
|
|
107
|
+
* cbs and $management sessions, token provider, sender and receivers.
|
|
108
|
+
*/
|
|
109
|
+
private readonly _context;
|
|
110
|
+
/**
|
|
111
|
+
* The auth loop.
|
|
112
|
+
*/
|
|
113
|
+
private authLoop?;
|
|
114
|
+
/**
|
|
115
|
+
* The logger.
|
|
116
|
+
*/
|
|
117
|
+
private readonly logger;
|
|
118
|
+
/** The client identifier */
|
|
119
|
+
private _id;
|
|
120
|
+
/**
|
|
121
|
+
* Creates a new EventHubSender instance.
|
|
122
|
+
* @param context - The connection context.
|
|
123
|
+
* @param options - Options used to configure the EventHubSender.
|
|
124
|
+
*/
|
|
125
|
+
constructor(context: ConnectionContext, senderId: string, { partitionId, enableIdempotentProducer, partitionPublishingOptions }: EventHubSenderOptions);
|
|
126
|
+
/**
|
|
127
|
+
* Deletes the sender from the context. Clears the token renewal timer. Closes the sender link.
|
|
128
|
+
*/
|
|
129
|
+
close(): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Determines whether the AMQP sender link is open. If open then returns true else returns false.
|
|
132
|
+
* @returns boolean
|
|
133
|
+
*/
|
|
134
|
+
isOpen(): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Returns maximum message size on the AMQP sender link.
|
|
137
|
+
* @param abortSignal - An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
|
138
|
+
* For example, use the @azure/abort-controller to create an `AbortSignal`.
|
|
139
|
+
* @returns Promise<number>
|
|
140
|
+
* @throws AbortError if the operation is cancelled via the abortSignal.
|
|
141
|
+
*/
|
|
142
|
+
getMaxMessageSize(options?: {
|
|
143
|
+
retryOptions?: RetryOptions;
|
|
144
|
+
abortSignal?: AbortSignalLike;
|
|
145
|
+
}): Promise<number>;
|
|
146
|
+
/**
|
|
147
|
+
* Get the information about the state of publishing for a partition as observed by the `EventHubSender`.
|
|
148
|
+
* This data can always be read, but will only be populated with information relevant to the active features
|
|
149
|
+
* for the producer client.
|
|
150
|
+
*/
|
|
151
|
+
getPartitionPublishingProperties(options?: {
|
|
152
|
+
retryOptions?: RetryOptions;
|
|
153
|
+
abortSignal?: AbortSignalLike;
|
|
154
|
+
}): Promise<PartitionPublishingProperties>;
|
|
155
|
+
/**
|
|
156
|
+
* Send a batch of EventData to the EventHub. The "message_annotations",
|
|
157
|
+
* "application_properties" and "properties" of the first message will be set as that
|
|
158
|
+
* of the envelope (batch message).
|
|
159
|
+
* @param events - An array of EventData objects to be sent in a Batch message.
|
|
160
|
+
* @param options - Options to control the way the events are batched along with request options
|
|
161
|
+
*/
|
|
162
|
+
send(events: EventData[] | EventDataBatch, options?: SendOptions & EventHubProducerOptions & {
|
|
163
|
+
tracingProperties?: Array<EventData["properties"]>;
|
|
164
|
+
}): Promise<void>;
|
|
165
|
+
/**
|
|
166
|
+
* @param sender - The rhea sender that contains the idempotent producer properties.
|
|
167
|
+
*/
|
|
168
|
+
private _populateLocalPublishingProperties;
|
|
169
|
+
private _deleteFromCache;
|
|
170
|
+
private _createSenderOptions;
|
|
171
|
+
/**
|
|
172
|
+
* Tries to send the message to EventHub if there is enough credit to send them
|
|
173
|
+
* and the circular buffer has available space to settle the message after sending them.
|
|
174
|
+
*
|
|
175
|
+
* We have implemented a synchronous send over here in the sense that we shall be waiting
|
|
176
|
+
* for the message to be accepted or rejected and accordingly resolve or reject the promise.
|
|
177
|
+
* @param rheaMessage - The message to be sent to EventHub.
|
|
178
|
+
* @returns Promise<void>
|
|
179
|
+
*/
|
|
180
|
+
private _trySendBatch;
|
|
181
|
+
private _getLink;
|
|
182
|
+
/**
|
|
183
|
+
* Initializes the sender session on the connection.
|
|
184
|
+
* Should only be called from _createLinkIfNotOpen
|
|
185
|
+
*/
|
|
186
|
+
private _init;
|
|
187
|
+
/**
|
|
188
|
+
* Creates a new sender to the given event hub, and optionally to a given partition if it is
|
|
189
|
+
* not present in the context or returns the one present in the context.
|
|
190
|
+
* @hidden
|
|
191
|
+
* @param options - Options used to configure the EventHubSender.
|
|
192
|
+
*/
|
|
193
|
+
static create(context: ConnectionContext, senderId: string, options: EventHubSenderOptions): EventHubSender;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Generates the link properties for an indemopotent sender given
|
|
197
|
+
* based on the user-provided and locally-cached publishing options.
|
|
198
|
+
*
|
|
199
|
+
* Note: The set of idempotent properties a user specifies at EventHubProducerClient instantiation-time
|
|
200
|
+
* is slightly different than what the service returns and the EventHubSender keeps track of locally.
|
|
201
|
+
*
|
|
202
|
+
* The difference is that the user specifies the `startingSequenceNumber`, whereas the local options
|
|
203
|
+
* (those returned by getPartitionPublishingProperties) specifies `lastPublishedSequenceNumber`.
|
|
204
|
+
*
|
|
205
|
+
* These _can_ be the same, but the user is technically free to set any `startingSequenceNumber` they want.
|
|
206
|
+
* @internal
|
|
207
|
+
*/
|
|
208
|
+
export declare function generateIdempotentLinkProperties(userProvidedPublishingOptions: PartitionPublishingOptions | undefined, localPublishingOptions: PartitionPublishingProperties | undefined): IdempotentLinkProperties | Record<string, never>;
|
|
209
|
+
/**
|
|
210
|
+
* Encodes a list or batch of events into a single binary message that can be sent to the service.
|
|
211
|
+
*
|
|
212
|
+
* Prior to encoding, any special properties not specified by the user, such as tracing or idempotent
|
|
213
|
+
* properties, are assigned to the list or batch of events as needed.
|
|
214
|
+
*
|
|
215
|
+
* @internal
|
|
216
|
+
* @param events - Events to transform for sending to the service.
|
|
217
|
+
* @param publishingProps - Describes the current publishing state for the partition.
|
|
218
|
+
* @param options - Options used to configure this function.
|
|
219
|
+
*/
|
|
220
|
+
export declare function transformEventsForSend(events: EventData[] | EventDataBatch, publishingProps: PartitionPublishingProperties, options?: SendOptions & {
|
|
221
|
+
/**
|
|
222
|
+
* A list containing the `Diagnostic-Id` tracing property that is associated with each EventData.
|
|
223
|
+
* The index of tracingProperties corresponds to the same index in `events` when `events` is EventData[].
|
|
224
|
+
*/
|
|
225
|
+
tracingProperties?: Array<EventData["properties"]>;
|
|
226
|
+
}): Buffer;
|
|
227
|
+
//# sourceMappingURL=eventHubSender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventHubSender.d.ts","sourceRoot":"","sources":["../../src/eventHubSender.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,kBAAkB,CAAC;AASlE,OAAO,KAAK,EAAE,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,qBAAqB,CAAC;AAI9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,KAAK,EAAE,WAAW,E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