@azure/event-hubs 5.13.0-beta.2 → 6.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.
- package/README.md +32 -31
- package/dist/browser/batchingPartitionChannel.d.ts +94 -0
- package/dist/browser/batchingPartitionChannel.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/batchingPartitionChannel.js +4 -4
- package/dist/browser/batchingPartitionChannel.js.map +1 -0
- package/dist/browser/connectionContext.d.ts +108 -0
- package/dist/browser/connectionContext.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/connectionContext.js +9 -11
- package/dist/browser/connectionContext.js.map +1 -0
- package/dist/browser/dataTransformer.d.ts +53 -0
- package/dist/browser/dataTransformer.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/dataTransformer.js +2 -2
- package/dist/browser/dataTransformer.js.map +1 -0
- package/dist/browser/diagnostics/instrumentEventData.d.ts +28 -0
- package/dist/browser/diagnostics/instrumentEventData.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/diagnostics/instrumentEventData.js +3 -3
- package/dist/browser/diagnostics/instrumentEventData.js.map +1 -0
- package/dist/browser/diagnostics/tracing.d.ts +19 -0
- package/dist/browser/diagnostics/tracing.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/diagnostics/tracing.js +2 -2
- package/dist/browser/diagnostics/tracing.js.map +1 -0
- package/dist/browser/eventData.d.ts +295 -0
- package/dist/browser/eventData.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventData.js +39 -5
- package/dist/browser/eventData.js.map +1 -0
- package/dist/browser/eventDataAdapter.d.ts +69 -0
- package/dist/browser/eventDataAdapter.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventDataAdapter.js +1 -1
- package/dist/browser/eventDataAdapter.js.map +1 -0
- package/dist/browser/eventDataBatch.d.ts +225 -0
- package/dist/browser/eventDataBatch.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventDataBatch.js +7 -4
- package/dist/browser/eventDataBatch.js.map +1 -0
- package/dist/browser/eventHubBufferedProducerClient.d.ts +323 -0
- package/dist/browser/eventHubBufferedProducerClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventHubBufferedProducerClient.js +10 -9
- package/dist/browser/eventHubBufferedProducerClient.js.map +1 -0
- package/dist/browser/eventHubConsumerClient.d.ts +277 -0
- package/dist/browser/eventHubConsumerClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventHubConsumerClient.js +12 -12
- package/dist/browser/eventHubConsumerClient.js.map +1 -0
- package/dist/browser/eventHubConsumerClientModels.d.ts +218 -0
- package/dist/browser/eventHubConsumerClientModels.d.ts.map +1 -0
- package/dist/browser/eventHubConsumerClientModels.js +4 -0
- package/dist/browser/eventHubConsumerClientModels.js.map +1 -0
- package/dist/browser/eventHubProducerClient.d.ts +266 -0
- package/dist/browser/eventHubProducerClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventHubProducerClient.js +12 -10
- package/dist/browser/eventHubProducerClient.js.map +1 -0
- package/dist/browser/eventHubSender.d.ts +227 -0
- package/dist/browser/eventHubSender.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventHubSender.js +12 -12
- package/dist/browser/eventHubSender.js.map +1 -0
- package/dist/browser/eventPosition.d.ts +73 -0
- package/dist/browser/eventPosition.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventPosition.js +2 -2
- package/dist/browser/eventPosition.js.map +1 -0
- package/dist/browser/eventProcessor.d.ts +232 -0
- package/dist/browser/eventProcessor.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventProcessor.js +18 -18
- package/dist/browser/eventProcessor.js.map +1 -0
- package/dist/browser/eventhubConnectionConfig.d.ts +96 -0
- package/dist/browser/eventhubConnectionConfig.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventhubConnectionConfig.js +2 -2
- package/dist/browser/eventhubConnectionConfig.js.map +1 -0
- package/dist/browser/impl/awaitableQueue.d.ts +25 -0
- package/dist/browser/impl/awaitableQueue.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/impl/awaitableQueue.js +1 -1
- package/dist/browser/impl/awaitableQueue.js.map +1 -0
- package/dist/browser/impl/partitionAssigner.d.ts +29 -0
- package/dist/browser/impl/partitionAssigner.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/impl/partitionAssigner.js +2 -2
- package/dist/browser/impl/partitionAssigner.js.map +1 -0
- package/dist/browser/impl/partitionGate.d.ts +27 -0
- package/dist/browser/impl/partitionGate.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/impl/partitionGate.js +1 -1
- package/{dist-esm/src → dist/browser}/impl/partitionGate.js.map +1 -1
- package/dist/browser/impl/partitionKeyToIdMapper.d.ts +6 -0
- package/dist/browser/impl/partitionKeyToIdMapper.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/impl/partitionKeyToIdMapper.js +1 -1
- package/{dist-esm/src → dist/browser}/impl/partitionKeyToIdMapper.js.map +1 -1
- package/dist/browser/inMemoryCheckpointStore.d.ts +44 -0
- package/dist/browser/inMemoryCheckpointStore.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/inMemoryCheckpointStore.js +3 -3
- package/dist/browser/inMemoryCheckpointStore.js.map +1 -0
- package/dist/browser/index.d.ts +21 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/index.js +9 -9
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/loadBalancerStrategies/balancedStrategy.d.ts +30 -0
- package/dist/browser/loadBalancerStrategies/balancedStrategy.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/loadBalancerStrategies/balancedStrategy.js +2 -2
- package/dist/browser/loadBalancerStrategies/balancedStrategy.js.map +1 -0
- package/dist/browser/loadBalancerStrategies/greedyStrategy.d.ts +24 -0
- package/dist/browser/loadBalancerStrategies/greedyStrategy.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/loadBalancerStrategies/greedyStrategy.js +2 -2
- package/dist/browser/loadBalancerStrategies/greedyStrategy.js.map +1 -0
- package/dist/browser/loadBalancerStrategies/loadBalancingStrategy.d.ts +28 -0
- package/dist/browser/loadBalancerStrategies/loadBalancingStrategy.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/loadBalancerStrategies/loadBalancingStrategy.js +2 -2
- package/dist/browser/loadBalancerStrategies/loadBalancingStrategy.js.map +1 -0
- package/dist/browser/loadBalancerStrategies/unbalancedStrategy.d.ts +20 -0
- package/dist/browser/loadBalancerStrategies/unbalancedStrategy.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/loadBalancerStrategies/unbalancedStrategy.js +1 -1
- package/dist/browser/loadBalancerStrategies/unbalancedStrategy.js.map +1 -0
- package/dist/browser/logger.d.ts +37 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/logger.js +1 -1
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/managementClient.d.ts +145 -0
- package/dist/browser/managementClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/managementClient.js +8 -8
- package/dist/browser/managementClient.js.map +1 -0
- package/dist/browser/models/private.d.ts +185 -0
- package/dist/browser/models/private.d.ts.map +1 -0
- package/dist/browser/models/private.js +4 -0
- package/dist/browser/models/private.js.map +1 -0
- package/dist/browser/models/public.d.ts +240 -0
- package/dist/browser/models/public.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/models/public.js +1 -1
- package/dist/browser/models/public.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/partitionProcessor.d.ts +134 -0
- package/dist/browser/partitionProcessor.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/partitionProcessor.js +2 -2
- package/dist/browser/partitionProcessor.js.map +1 -0
- package/dist/browser/partitionPump.d.ts +38 -0
- package/dist/browser/partitionPump.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/partitionPump.js +6 -7
- package/dist/browser/partitionPump.js.map +1 -0
- package/dist/browser/partitionReceiver.d.ts +82 -0
- package/dist/browser/partitionReceiver.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/partitionReceiver.js +14 -12
- package/dist/browser/partitionReceiver.js.map +1 -0
- package/dist/browser/pumpManager.d.ts +72 -0
- package/dist/browser/pumpManager.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/pumpManager.js +4 -4
- package/dist/browser/pumpManager.js.map +1 -0
- package/dist/browser/util/connectionStringUtils.d.ts +52 -0
- package/dist/browser/util/connectionStringUtils.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/connectionStringUtils.js +1 -1
- package/{dist-esm/src → dist/browser}/util/connectionStringUtils.js.map +1 -1
- package/dist/browser/util/constants.d.ts +25 -0
- package/dist/browser/util/constants.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/constants.js +4 -2
- package/dist/browser/util/constants.js.map +1 -0
- package/dist/browser/util/delayWithoutThrow.d.ts +8 -0
- package/dist/browser/util/delayWithoutThrow.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/delayWithoutThrow.js +1 -1
- package/dist/browser/util/delayWithoutThrow.js.map +1 -0
- package/dist/browser/util/error.d.ts +39 -0
- package/dist/browser/util/error.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/error.js +2 -2
- package/dist/browser/util/error.js.map +1 -0
- package/dist/browser/util/getPromiseParts.d.ts +10 -0
- package/dist/browser/util/getPromiseParts.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/getPromiseParts.js +1 -1
- package/{dist-esm/src → dist/browser}/util/getPromiseParts.js.map +1 -1
- package/dist/browser/util/operationOptions.d.ts +16 -0
- package/dist/browser/util/operationOptions.d.ts.map +1 -0
- package/dist/browser/util/operationOptions.js +4 -0
- package/dist/browser/util/operationOptions.js.map +1 -0
- package/dist/browser/util/parseEndpoint.d.ts +11 -0
- package/dist/browser/util/parseEndpoint.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/parseEndpoint.js +1 -1
- package/{dist-esm/src → dist/browser}/util/parseEndpoint.js.map +1 -1
- package/dist/browser/util/retries.d.ts +6 -0
- package/dist/browser/util/retries.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/retries.js +1 -1
- package/dist/browser/util/retries.js.map +1 -0
- package/dist/browser/util/runtimeInfo-browser.d.mts.map +1 -0
- package/dist/browser/util/runtimeInfo-browser.mjs.map +1 -0
- package/dist/browser/util/runtimeInfo.d.ts +6 -0
- package/{dist-esm/src/util/runtimeInfo.browser.js → dist/browser/util/runtimeInfo.js} +2 -2
- package/dist/browser/util/timerLoop.d.ts +26 -0
- package/dist/browser/util/timerLoop.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/timerLoop.js +1 -1
- package/{dist-esm/src → dist/browser}/util/timerLoop.js.map +1 -1
- package/dist/browser/util/typeGuards.d.ts +8 -0
- package/dist/browser/util/typeGuards.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/typeGuards.js +2 -2
- package/dist/browser/util/typeGuards.js.map +1 -0
- package/dist/browser/util/utils.d.ts +7 -0
- package/dist/browser/util/utils.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util/utils.js +1 -1
- package/{dist-esm/src → dist/browser}/util/utils.js.map +1 -1
- package/dist/browser/withAuth.d.ts +25 -0
- package/dist/browser/withAuth.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/withAuth.js +4 -4
- package/dist/browser/withAuth.js.map +1 -0
- package/dist/commonjs/batchingPartitionChannel.d.ts +94 -0
- package/dist/commonjs/batchingPartitionChannel.d.ts.map +1 -0
- package/dist/commonjs/batchingPartitionChannel.js +252 -0
- package/dist/commonjs/batchingPartitionChannel.js.map +1 -0
- package/dist/commonjs/connectionContext.d.ts +108 -0
- package/dist/commonjs/connectionContext.d.ts.map +1 -0
- package/dist/commonjs/connectionContext.js +322 -0
- package/dist/commonjs/connectionContext.js.map +1 -0
- package/dist/commonjs/dataTransformer.d.ts +53 -0
- package/dist/commonjs/dataTransformer.d.ts.map +1 -0
- package/dist/commonjs/dataTransformer.js +138 -0
- package/dist/commonjs/dataTransformer.js.map +1 -0
- package/dist/commonjs/diagnostics/instrumentEventData.d.ts +28 -0
- package/dist/commonjs/diagnostics/instrumentEventData.d.ts.map +1 -0
- package/dist/commonjs/diagnostics/instrumentEventData.js +73 -0
- package/dist/commonjs/diagnostics/instrumentEventData.js.map +1 -0
- package/dist/commonjs/diagnostics/tracing.d.ts +19 -0
- package/dist/commonjs/diagnostics/tracing.d.ts.map +1 -0
- package/dist/commonjs/diagnostics/tracing.js +44 -0
- package/dist/commonjs/diagnostics/tracing.js.map +1 -0
- package/dist/commonjs/eventData.d.ts +295 -0
- package/dist/commonjs/eventData.d.ts.map +1 -0
- package/dist/commonjs/eventData.js +253 -0
- package/dist/commonjs/eventData.js.map +1 -0
- package/dist/commonjs/eventDataAdapter.d.ts +69 -0
- package/dist/commonjs/eventDataAdapter.d.ts.map +1 -0
- package/dist/commonjs/eventDataAdapter.js +38 -0
- package/dist/commonjs/eventDataAdapter.js.map +1 -0
- package/dist/commonjs/eventDataBatch.d.ts +225 -0
- package/dist/commonjs/eventDataBatch.d.ts.map +1 -0
- package/dist/commonjs/eventDataBatch.js +254 -0
- package/dist/commonjs/eventDataBatch.js.map +1 -0
- package/dist/commonjs/eventHubBufferedProducerClient.d.ts +323 -0
- package/dist/commonjs/eventHubBufferedProducerClient.d.ts.map +1 -0
- package/dist/commonjs/eventHubBufferedProducerClient.js +289 -0
- package/dist/commonjs/eventHubBufferedProducerClient.js.map +1 -0
- package/dist/commonjs/eventHubConsumerClient.d.ts +277 -0
- package/dist/commonjs/eventHubConsumerClient.d.ts.map +1 -0
- package/dist/commonjs/eventHubConsumerClient.js +298 -0
- package/dist/commonjs/eventHubConsumerClient.js.map +1 -0
- package/dist/commonjs/eventHubConsumerClientModels.d.ts +218 -0
- package/dist/commonjs/eventHubConsumerClientModels.d.ts.map +1 -0
- package/dist/commonjs/eventHubConsumerClientModels.js +5 -0
- package/dist/commonjs/eventHubConsumerClientModels.js.map +1 -0
- package/dist/commonjs/eventHubProducerClient.d.ts +266 -0
- package/dist/commonjs/eventHubProducerClient.d.ts.map +1 -0
- package/dist/commonjs/eventHubProducerClient.js +319 -0
- package/dist/commonjs/eventHubProducerClient.js.map +1 -0
- package/dist/commonjs/eventHubSender.d.ts +227 -0
- package/dist/commonjs/eventHubSender.d.ts.map +1 -0
- package/dist/commonjs/eventHubSender.js +547 -0
- package/dist/commonjs/eventHubSender.js.map +1 -0
- package/dist/commonjs/eventPosition.d.ts +73 -0
- package/dist/commonjs/eventPosition.d.ts.map +1 -0
- package/dist/commonjs/eventPosition.js +128 -0
- package/dist/commonjs/eventPosition.js.map +1 -0
- package/dist/commonjs/eventProcessor.d.ts +232 -0
- package/dist/commonjs/eventProcessor.d.ts.map +1 -0
- package/dist/commonjs/eventProcessor.js +371 -0
- package/dist/commonjs/eventProcessor.js.map +1 -0
- package/dist/commonjs/eventhubConnectionConfig.d.ts +96 -0
- package/dist/commonjs/eventhubConnectionConfig.d.ts.map +1 -0
- package/dist/commonjs/eventhubConnectionConfig.js +101 -0
- package/dist/commonjs/eventhubConnectionConfig.js.map +1 -0
- package/dist/commonjs/impl/awaitableQueue.d.ts +25 -0
- package/dist/commonjs/impl/awaitableQueue.d.ts.map +1 -0
- package/dist/commonjs/impl/awaitableQueue.js +51 -0
- package/dist/commonjs/impl/awaitableQueue.js.map +1 -0
- package/dist/commonjs/impl/partitionAssigner.d.ts +29 -0
- package/dist/commonjs/impl/partitionAssigner.d.ts.map +1 -0
- package/dist/commonjs/impl/partitionAssigner.js +58 -0
- package/dist/commonjs/impl/partitionAssigner.js.map +1 -0
- package/dist/commonjs/impl/partitionGate.d.ts +27 -0
- package/dist/commonjs/impl/partitionGate.d.ts.map +1 -0
- package/dist/commonjs/impl/partitionGate.js +44 -0
- package/dist/commonjs/impl/partitionGate.js.map +1 -0
- package/dist/commonjs/impl/partitionKeyToIdMapper.d.ts +6 -0
- package/dist/commonjs/impl/partitionKeyToIdMapper.d.ts.map +1 -0
- package/dist/commonjs/impl/partitionKeyToIdMapper.js +115 -0
- package/dist/commonjs/impl/partitionKeyToIdMapper.js.map +1 -0
- package/dist/commonjs/inMemoryCheckpointStore.d.ts +44 -0
- package/dist/commonjs/inMemoryCheckpointStore.d.ts.map +1 -0
- package/dist/commonjs/inMemoryCheckpointStore.js +96 -0
- package/dist/commonjs/inMemoryCheckpointStore.js.map +1 -0
- package/dist/commonjs/index.d.ts +21 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +26 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/loadBalancerStrategies/balancedStrategy.d.ts +30 -0
- package/dist/commonjs/loadBalancerStrategies/balancedStrategy.d.ts.map +1 -0
- package/dist/commonjs/loadBalancerStrategies/balancedStrategy.js +43 -0
- package/dist/commonjs/loadBalancerStrategies/balancedStrategy.js.map +1 -0
- package/dist/commonjs/loadBalancerStrategies/greedyStrategy.d.ts +24 -0
- package/dist/commonjs/loadBalancerStrategies/greedyStrategy.d.ts.map +1 -0
- package/dist/commonjs/loadBalancerStrategies/greedyStrategy.js +32 -0
- package/dist/commonjs/loadBalancerStrategies/greedyStrategy.js.map +1 -0
- package/dist/commonjs/loadBalancerStrategies/loadBalancingStrategy.d.ts +28 -0
- package/dist/commonjs/loadBalancerStrategies/loadBalancingStrategy.d.ts.map +1 -0
- package/dist/commonjs/loadBalancerStrategies/loadBalancingStrategy.js +248 -0
- package/dist/commonjs/loadBalancerStrategies/loadBalancingStrategy.js.map +1 -0
- package/dist/commonjs/loadBalancerStrategies/unbalancedStrategy.d.ts +20 -0
- package/dist/commonjs/loadBalancerStrategies/unbalancedStrategy.d.ts.map +1 -0
- package/dist/commonjs/loadBalancerStrategies/unbalancedStrategy.js +26 -0
- package/dist/commonjs/loadBalancerStrategies/unbalancedStrategy.js.map +1 -0
- package/dist/commonjs/logger.d.ts +37 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +65 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/managementClient.d.ts +145 -0
- package/dist/commonjs/managementClient.d.ts.map +1 -0
- package/dist/commonjs/managementClient.js +275 -0
- package/dist/commonjs/managementClient.js.map +1 -0
- package/dist/commonjs/models/private.d.ts +185 -0
- package/dist/commonjs/models/private.d.ts.map +1 -0
- package/dist/commonjs/models/private.js +5 -0
- package/dist/commonjs/models/private.js.map +1 -0
- package/dist/commonjs/models/public.d.ts +240 -0
- package/dist/commonjs/models/public.d.ts.map +1 -0
- package/dist/commonjs/models/public.js +21 -0
- package/dist/commonjs/models/public.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/partitionProcessor.d.ts +134 -0
- package/dist/commonjs/partitionProcessor.d.ts.map +1 -0
- package/dist/commonjs/partitionProcessor.js +138 -0
- package/dist/commonjs/partitionProcessor.js.map +1 -0
- package/dist/commonjs/partitionPump.d.ts +38 -0
- package/dist/commonjs/partitionPump.d.ts.map +1 -0
- package/dist/commonjs/partitionPump.js +171 -0
- package/dist/commonjs/partitionPump.js.map +1 -0
- package/dist/commonjs/partitionReceiver.d.ts +82 -0
- package/dist/commonjs/partitionReceiver.d.ts.map +1 -0
- package/dist/commonjs/partitionReceiver.js +335 -0
- package/dist/commonjs/partitionReceiver.js.map +1 -0
- package/dist/commonjs/pumpManager.d.ts +72 -0
- package/dist/commonjs/pumpManager.d.ts.map +1 -0
- package/dist/commonjs/pumpManager.js +122 -0
- package/dist/commonjs/pumpManager.js.map +1 -0
- package/{types/latest → dist/commonjs}/tsdoc-metadata.json +1 -1
- package/dist/commonjs/util/connectionStringUtils.d.ts +52 -0
- package/dist/commonjs/util/connectionStringUtils.d.ts.map +1 -0
- package/dist/commonjs/util/connectionStringUtils.js +51 -0
- package/dist/commonjs/util/connectionStringUtils.js.map +1 -0
- package/dist/commonjs/util/constants.d.ts +25 -0
- package/dist/commonjs/util/constants.d.ts.map +1 -0
- package/dist/commonjs/util/constants.js +30 -0
- package/dist/commonjs/util/constants.js.map +1 -0
- package/dist/commonjs/util/delayWithoutThrow.d.ts +8 -0
- package/dist/commonjs/util/delayWithoutThrow.d.ts.map +1 -0
- package/dist/commonjs/util/delayWithoutThrow.js +20 -0
- package/dist/commonjs/util/delayWithoutThrow.js.map +1 -0
- package/dist/commonjs/util/error.d.ts +39 -0
- package/dist/commonjs/util/error.d.ts.map +1 -0
- package/dist/commonjs/util/error.js +110 -0
- package/dist/commonjs/util/error.js.map +1 -0
- package/dist/commonjs/util/getPromiseParts.d.ts +10 -0
- package/dist/commonjs/util/getPromiseParts.d.ts.map +1 -0
- package/dist/commonjs/util/getPromiseParts.js +23 -0
- package/dist/commonjs/util/getPromiseParts.js.map +1 -0
- package/dist/commonjs/util/operationOptions.d.ts +16 -0
- package/dist/commonjs/util/operationOptions.d.ts.map +1 -0
- package/dist/commonjs/util/operationOptions.js +5 -0
- package/dist/commonjs/util/operationOptions.js.map +1 -0
- package/dist/commonjs/util/parseEndpoint.d.ts +11 -0
- package/dist/commonjs/util/parseEndpoint.d.ts.map +1 -0
- package/dist/commonjs/util/parseEndpoint.js +20 -0
- package/dist/commonjs/util/parseEndpoint.js.map +1 -0
- package/dist/commonjs/util/retries.d.ts +6 -0
- package/dist/commonjs/util/retries.d.ts.map +1 -0
- package/dist/commonjs/util/retries.js +16 -0
- package/dist/commonjs/util/retries.js.map +1 -0
- package/dist/commonjs/util/runtimeInfo.d.ts +6 -0
- package/dist/commonjs/util/runtimeInfo.d.ts.map +1 -0
- package/dist/commonjs/util/runtimeInfo.js +15 -0
- package/dist/commonjs/util/runtimeInfo.js.map +1 -0
- package/dist/commonjs/util/timerLoop.d.ts +26 -0
- package/dist/commonjs/util/timerLoop.d.ts.map +1 -0
- package/dist/commonjs/util/timerLoop.js +30 -0
- package/dist/commonjs/util/timerLoop.js.map +1 -0
- package/dist/commonjs/util/typeGuards.d.ts +8 -0
- package/dist/commonjs/util/typeGuards.d.ts.map +1 -0
- package/dist/commonjs/util/typeGuards.js +15 -0
- package/dist/commonjs/util/typeGuards.js.map +1 -0
- package/dist/commonjs/util/utils.d.ts +7 -0
- package/dist/commonjs/util/utils.d.ts.map +1 -0
- package/dist/commonjs/util/utils.js +16 -0
- package/dist/commonjs/util/utils.js.map +1 -0
- package/dist/commonjs/withAuth.d.ts +25 -0
- package/dist/commonjs/withAuth.d.ts.map +1 -0
- package/dist/commonjs/withAuth.js +88 -0
- package/dist/commonjs/withAuth.js.map +1 -0
- package/dist/esm/batchingPartitionChannel.d.ts +94 -0
- package/dist/esm/batchingPartitionChannel.d.ts.map +1 -0
- package/dist/esm/batchingPartitionChannel.js +248 -0
- package/dist/esm/batchingPartitionChannel.js.map +1 -0
- package/dist/esm/connectionContext.d.ts +108 -0
- package/dist/esm/connectionContext.d.ts.map +1 -0
- package/dist/esm/connectionContext.js +318 -0
- package/dist/esm/connectionContext.js.map +1 -0
- package/dist/esm/dataTransformer.d.ts +53 -0
- package/dist/esm/dataTransformer.d.ts.map +1 -0
- package/dist/esm/dataTransformer.js +133 -0
- package/dist/esm/dataTransformer.js.map +1 -0
- package/dist/esm/diagnostics/instrumentEventData.d.ts +28 -0
- package/dist/esm/diagnostics/instrumentEventData.d.ts.map +1 -0
- package/dist/esm/diagnostics/instrumentEventData.js +68 -0
- package/dist/esm/diagnostics/instrumentEventData.js.map +1 -0
- package/dist/esm/diagnostics/tracing.d.ts +19 -0
- package/dist/esm/diagnostics/tracing.d.ts.map +1 -0
- package/dist/esm/diagnostics/tracing.js +40 -0
- package/dist/esm/diagnostics/tracing.js.map +1 -0
- package/dist/esm/eventData.d.ts +295 -0
- package/dist/esm/eventData.d.ts.map +1 -0
- package/dist/esm/eventData.js +245 -0
- package/dist/esm/eventData.js.map +1 -0
- package/dist/esm/eventDataAdapter.d.ts +69 -0
- package/dist/esm/eventDataAdapter.d.ts.map +1 -0
- package/dist/esm/eventDataAdapter.js +35 -0
- package/dist/esm/eventDataAdapter.js.map +1 -0
- package/dist/esm/eventDataBatch.d.ts +225 -0
- package/dist/esm/eventDataBatch.d.ts.map +1 -0
- package/dist/esm/eventDataBatch.js +249 -0
- package/dist/esm/eventDataBatch.js.map +1 -0
- package/dist/esm/eventHubBufferedProducerClient.d.ts +323 -0
- package/dist/esm/eventHubBufferedProducerClient.d.ts.map +1 -0
- package/dist/esm/eventHubBufferedProducerClient.js +285 -0
- package/dist/esm/eventHubBufferedProducerClient.js.map +1 -0
- package/dist/esm/eventHubConsumerClient.d.ts +277 -0
- package/dist/esm/eventHubConsumerClient.d.ts.map +1 -0
- package/dist/esm/eventHubConsumerClient.js +293 -0
- package/dist/esm/eventHubConsumerClient.js.map +1 -0
- package/dist/esm/eventHubConsumerClientModels.d.ts +218 -0
- package/dist/esm/eventHubConsumerClientModels.d.ts.map +1 -0
- package/dist/esm/eventHubConsumerClientModels.js +4 -0
- package/dist/esm/eventHubConsumerClientModels.js.map +1 -0
- package/dist/esm/eventHubProducerClient.d.ts +266 -0
- package/dist/esm/eventHubProducerClient.d.ts.map +1 -0
- package/dist/esm/eventHubProducerClient.js +315 -0
- package/dist/esm/eventHubProducerClient.js.map +1 -0
- package/dist/esm/eventHubSender.d.ts +227 -0
- package/dist/esm/eventHubSender.d.ts.map +1 -0
- package/dist/esm/eventHubSender.js +541 -0
- package/dist/esm/eventHubSender.js.map +1 -0
- package/dist/esm/eventPosition.d.ts +73 -0
- package/dist/esm/eventPosition.d.ts.map +1 -0
- package/dist/esm/eventPosition.js +121 -0
- package/dist/esm/eventPosition.js.map +1 -0
- package/dist/esm/eventProcessor.d.ts +232 -0
- package/dist/esm/eventProcessor.d.ts.map +1 -0
- package/dist/esm/eventProcessor.js +367 -0
- package/dist/esm/eventProcessor.js.map +1 -0
- package/dist/esm/eventhubConnectionConfig.d.ts +96 -0
- package/dist/esm/eventhubConnectionConfig.d.ts.map +1 -0
- package/dist/esm/eventhubConnectionConfig.js +98 -0
- package/dist/esm/eventhubConnectionConfig.js.map +1 -0
- package/dist/esm/impl/awaitableQueue.d.ts +25 -0
- package/dist/esm/impl/awaitableQueue.d.ts.map +1 -0
- package/dist/esm/impl/awaitableQueue.js +47 -0
- package/dist/esm/impl/awaitableQueue.js.map +1 -0
- package/dist/esm/impl/partitionAssigner.d.ts +29 -0
- package/dist/esm/impl/partitionAssigner.d.ts.map +1 -0
- package/dist/esm/impl/partitionAssigner.js +54 -0
- package/dist/esm/impl/partitionAssigner.js.map +1 -0
- package/dist/esm/impl/partitionGate.d.ts +27 -0
- package/dist/esm/impl/partitionGate.d.ts.map +1 -0
- package/dist/esm/impl/partitionGate.js +40 -0
- package/dist/esm/impl/partitionGate.js.map +1 -0
- package/dist/esm/impl/partitionKeyToIdMapper.d.ts +6 -0
- package/dist/esm/impl/partitionKeyToIdMapper.d.ts.map +1 -0
- package/dist/esm/impl/partitionKeyToIdMapper.js +111 -0
- package/dist/esm/impl/partitionKeyToIdMapper.js.map +1 -0
- package/dist/esm/inMemoryCheckpointStore.d.ts +44 -0
- package/dist/esm/inMemoryCheckpointStore.d.ts.map +1 -0
- package/dist/esm/inMemoryCheckpointStore.js +92 -0
- package/dist/esm/inMemoryCheckpointStore.js.map +1 -0
- package/dist/esm/index.d.ts +21 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loadBalancerStrategies/balancedStrategy.d.ts +30 -0
- package/dist/esm/loadBalancerStrategies/balancedStrategy.d.ts.map +1 -0
- package/dist/esm/loadBalancerStrategies/balancedStrategy.js +39 -0
- package/dist/esm/loadBalancerStrategies/balancedStrategy.js.map +1 -0
- package/dist/esm/loadBalancerStrategies/greedyStrategy.d.ts +24 -0
- package/dist/esm/loadBalancerStrategies/greedyStrategy.d.ts.map +1 -0
- package/dist/esm/loadBalancerStrategies/greedyStrategy.js +28 -0
- package/dist/esm/loadBalancerStrategies/greedyStrategy.js.map +1 -0
- package/dist/esm/loadBalancerStrategies/loadBalancingStrategy.d.ts +28 -0
- package/dist/esm/loadBalancerStrategies/loadBalancingStrategy.d.ts.map +1 -0
- package/dist/esm/loadBalancerStrategies/loadBalancingStrategy.js +245 -0
- package/dist/esm/loadBalancerStrategies/loadBalancingStrategy.js.map +1 -0
- package/dist/esm/loadBalancerStrategies/unbalancedStrategy.d.ts +20 -0
- package/dist/esm/loadBalancerStrategies/unbalancedStrategy.d.ts.map +1 -0
- package/dist/esm/loadBalancerStrategies/unbalancedStrategy.js +22 -0
- package/dist/esm/loadBalancerStrategies/unbalancedStrategy.js.map +1 -0
- package/dist/esm/logger.d.ts +37 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +56 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/managementClient.d.ts +145 -0
- package/dist/esm/managementClient.d.ts.map +1 -0
- package/dist/esm/managementClient.js +271 -0
- package/dist/esm/managementClient.js.map +1 -0
- package/dist/esm/models/private.d.ts +185 -0
- package/dist/esm/models/private.d.ts.map +1 -0
- package/dist/esm/models/private.js +4 -0
- package/dist/esm/models/private.js.map +1 -0
- package/dist/esm/models/public.d.ts +240 -0
- package/dist/esm/models/public.d.ts.map +1 -0
- package/dist/esm/models/public.js +18 -0
- package/dist/esm/models/public.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/partitionProcessor.d.ts +134 -0
- package/dist/esm/partitionProcessor.d.ts.map +1 -0
- package/dist/esm/partitionProcessor.js +134 -0
- package/dist/esm/partitionProcessor.js.map +1 -0
- package/dist/esm/partitionPump.d.ts +38 -0
- package/dist/esm/partitionPump.d.ts.map +1 -0
- package/dist/esm/partitionPump.js +166 -0
- package/dist/esm/partitionPump.js.map +1 -0
- package/dist/esm/partitionReceiver.d.ts +82 -0
- package/dist/esm/partitionReceiver.d.ts.map +1 -0
- package/dist/esm/partitionReceiver.js +330 -0
- package/dist/esm/partitionReceiver.js.map +1 -0
- package/dist/esm/pumpManager.d.ts +72 -0
- package/dist/esm/pumpManager.d.ts.map +1 -0
- package/dist/esm/pumpManager.js +118 -0
- package/dist/esm/pumpManager.js.map +1 -0
- package/dist/esm/util/connectionStringUtils.d.ts +52 -0
- package/dist/esm/util/connectionStringUtils.d.ts.map +1 -0
- package/dist/esm/util/connectionStringUtils.js +48 -0
- package/dist/esm/util/connectionStringUtils.js.map +1 -0
- package/dist/esm/util/constants.d.ts +25 -0
- package/dist/esm/util/constants.d.ts.map +1 -0
- package/dist/esm/util/constants.js +27 -0
- package/dist/esm/util/constants.js.map +1 -0
- package/dist/esm/util/delayWithoutThrow.d.ts +8 -0
- package/dist/esm/util/delayWithoutThrow.d.ts.map +1 -0
- package/dist/esm/util/delayWithoutThrow.js +17 -0
- package/dist/esm/util/delayWithoutThrow.js.map +1 -0
- package/dist/esm/util/error.d.ts +39 -0
- package/dist/esm/util/error.d.ts.map +1 -0
- package/dist/esm/util/error.js +103 -0
- package/dist/esm/util/error.js.map +1 -0
- package/dist/esm/util/getPromiseParts.d.ts +10 -0
- package/dist/esm/util/getPromiseParts.d.ts.map +1 -0
- package/dist/esm/util/getPromiseParts.js +20 -0
- package/dist/esm/util/getPromiseParts.js.map +1 -0
- package/dist/esm/util/operationOptions.d.ts +16 -0
- package/dist/esm/util/operationOptions.d.ts.map +1 -0
- package/dist/esm/util/operationOptions.js +4 -0
- package/dist/esm/util/operationOptions.js.map +1 -0
- package/dist/esm/util/parseEndpoint.d.ts +11 -0
- package/dist/esm/util/parseEndpoint.d.ts.map +1 -0
- package/dist/esm/util/parseEndpoint.js +17 -0
- package/dist/esm/util/parseEndpoint.js.map +1 -0
- package/dist/esm/util/retries.d.ts +6 -0
- package/dist/esm/util/retries.d.ts.map +1 -0
- package/dist/esm/util/retries.js +13 -0
- package/dist/esm/util/retries.js.map +1 -0
- package/dist/esm/util/runtimeInfo.d.ts +6 -0
- package/dist/esm/util/runtimeInfo.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/util/runtimeInfo.js +1 -1
- package/{dist-esm/src → dist/esm}/util/runtimeInfo.js.map +1 -1
- package/dist/esm/util/timerLoop.d.ts +26 -0
- package/dist/esm/util/timerLoop.d.ts.map +1 -0
- package/dist/esm/util/timerLoop.js +27 -0
- package/dist/esm/util/timerLoop.js.map +1 -0
- package/dist/esm/util/typeGuards.d.ts +8 -0
- package/dist/esm/util/typeGuards.d.ts.map +1 -0
- package/dist/esm/util/typeGuards.js +12 -0
- package/dist/esm/util/typeGuards.js.map +1 -0
- package/dist/esm/util/utils.d.ts +7 -0
- package/dist/esm/util/utils.d.ts.map +1 -0
- package/dist/esm/util/utils.js +13 -0
- package/dist/esm/util/utils.js.map +1 -0
- package/dist/esm/withAuth.d.ts +25 -0
- package/dist/esm/withAuth.d.ts.map +1 -0
- package/dist/esm/withAuth.js +84 -0
- package/dist/esm/withAuth.js.map +1 -0
- package/package.json +85 -80
- package/dist/index.js +0 -5372
- package/dist/index.js.map +0 -1
- package/dist-esm/src/batchingPartitionChannel.js.map +0 -1
- package/dist-esm/src/connectionContext.js.map +0 -1
- package/dist-esm/src/dataTransformer.js.map +0 -1
- package/dist-esm/src/diagnostics/instrumentEventData.js.map +0 -1
- package/dist-esm/src/diagnostics/tracing.js.map +0 -1
- package/dist-esm/src/eventData.js.map +0 -1
- package/dist-esm/src/eventDataAdapter.js.map +0 -1
- package/dist-esm/src/eventDataBatch.js.map +0 -1
- package/dist-esm/src/eventHubBufferedProducerClient.js.map +0 -1
- package/dist-esm/src/eventHubConsumerClient.js.map +0 -1
- package/dist-esm/src/eventHubConsumerClientModels.js +0 -4
- package/dist-esm/src/eventHubConsumerClientModels.js.map +0 -1
- package/dist-esm/src/eventHubProducerClient.js.map +0 -1
- package/dist-esm/src/eventHubSender.js.map +0 -1
- package/dist-esm/src/eventPosition.js.map +0 -1
- package/dist-esm/src/eventProcessor.js.map +0 -1
- package/dist-esm/src/eventhubConnectionConfig.js.map +0 -1
- package/dist-esm/src/impl/awaitableQueue.js.map +0 -1
- package/dist-esm/src/impl/partitionAssigner.js.map +0 -1
- package/dist-esm/src/inMemoryCheckpointStore.js.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/loadBalancerStrategies/balancedStrategy.js.map +0 -1
- package/dist-esm/src/loadBalancerStrategies/greedyStrategy.js.map +0 -1
- package/dist-esm/src/loadBalancerStrategies/loadBalancingStrategy.js.map +0 -1
- package/dist-esm/src/loadBalancerStrategies/unbalancedStrategy.js.map +0 -1
- package/dist-esm/src/logger.js.map +0 -1
- package/dist-esm/src/managementClient.js.map +0 -1
- package/dist-esm/src/models/private.js +0 -4
- package/dist-esm/src/models/private.js.map +0 -1
- package/dist-esm/src/models/public.js.map +0 -1
- package/dist-esm/src/partitionProcessor.js.map +0 -1
- package/dist-esm/src/partitionPump.js.map +0 -1
- package/dist-esm/src/partitionReceiver.js.map +0 -1
- package/dist-esm/src/pumpManager.js.map +0 -1
- package/dist-esm/src/util/constants.js.map +0 -1
- package/dist-esm/src/util/delayWithoutThrow.js.map +0 -1
- package/dist-esm/src/util/error.js.map +0 -1
- package/dist-esm/src/util/operationOptions.js +0 -4
- package/dist-esm/src/util/operationOptions.js.map +0 -1
- package/dist-esm/src/util/retries.js.map +0 -1
- package/dist-esm/src/util/runtimeInfo.browser.js.map +0 -1
- package/dist-esm/src/util/typeGuards.js.map +0 -1
- package/dist-esm/src/withAuth.js.map +0 -1
- package/types/latest/event-hubs.d.ts +0 -1877
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type { LoadBalancingStrategy } from "../loadBalancerStrategies/loadBalancingStrategy.js";
|
|
2
|
+
import type { RetryOptions } from "@azure/core-amqp";
|
|
3
|
+
import type { Typed } from "rhea-promise";
|
|
4
|
+
import type { SubscribeOptions } from "../eventHubConsumerClientModels.js";
|
|
5
|
+
import type { idempotentProducerAmqpPropertyNames } from "../util/constants.js";
|
|
6
|
+
/**
|
|
7
|
+
* The set of options to configure the behavior of an `EventHubProducer`.
|
|
8
|
+
* These can be specified when creating the producer via the `createProducer` method.
|
|
9
|
+
* - `partitionId` : The string identifier of the partition that the producer can be bound to.
|
|
10
|
+
* - `retryOptions` : The retry options used to govern retry attempts when an issue is encountered while sending events.
|
|
11
|
+
* A simple usage can be `{ "maxRetries": 4 }`.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export interface EventHubProducerOptions {
|
|
15
|
+
/**
|
|
16
|
+
* The identifier of the partition that the producer will be bound to.
|
|
17
|
+
* If a value is provided, all events sent using the producer will reach the same partition.
|
|
18
|
+
* If no value is provided, the service will determine the partition to which the event will be sent.
|
|
19
|
+
*/
|
|
20
|
+
partitionId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The retry options used to govern retry attempts when an issue is encountered while sending events.
|
|
23
|
+
* If no value is provided here, the retry options set when creating the `EventHubClient` is used.
|
|
24
|
+
*/
|
|
25
|
+
retryOptions?: RetryOptions;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export type OperationNames = "getEventHubProperties" | "getPartitionIds" | "getPartitionProperties";
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export interface CommonEventProcessorOptions extends Required<Pick<SubscribeOptions, "maxBatchSize" | "maxWaitTimeInSeconds">>, Pick<SubscribeOptions, Exclude<keyof SubscribeOptions, "maxBatchSize" | "maxWaitTimeInSeconds">> {
|
|
35
|
+
/**
|
|
36
|
+
* A load balancing strategy that determines how to claim partitions.
|
|
37
|
+
*/
|
|
38
|
+
loadBalancingStrategy: LoadBalancingStrategy;
|
|
39
|
+
/**
|
|
40
|
+
* An optional ownerId to use rather than using an internally generated ID
|
|
41
|
+
* This allows you to logically group a series of processors together (for instance
|
|
42
|
+
* like we do with EventHubConsumerClient)
|
|
43
|
+
*/
|
|
44
|
+
ownerId?: string;
|
|
45
|
+
/**
|
|
46
|
+
* The maximum amount of time since a PartitionOwnership was updated
|
|
47
|
+
* to use to determine if a partition is no longer claimed.
|
|
48
|
+
* Setting this value to 0 will cause the default value to be used.
|
|
49
|
+
*/
|
|
50
|
+
inactiveTimeLimitInMs?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Retry Options to be used when receiving events
|
|
53
|
+
*/
|
|
54
|
+
retryOptions?: RetryOptions;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The set of options to configure the behavior of an `EventHubConsumer`.
|
|
58
|
+
* These can be specified when creating the consumer using the `createConsumer` method.
|
|
59
|
+
* - `ownerLevel` : A number indicating that the consumer intends to be an exclusive consumer of events resulting in other
|
|
60
|
+
* consumers to fail if their `ownerLevel` is lower or doesn't exist.
|
|
61
|
+
* - `retryOptions`: The retry options used to govern retry attempts when an issue is encountered while receiving events.
|
|
62
|
+
* A simple usage can be `{ "maxRetries": 4 }`.
|
|
63
|
+
* - `skipParsingBodyAsJson` : Option to disable the client from running JSON.parse() on the message body when receiving the message.
|
|
64
|
+
* Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you prefer to work directly with
|
|
65
|
+
* the bytes present in the message body than have the client attempt to parse it.
|
|
66
|
+
*
|
|
67
|
+
* Example usage:
|
|
68
|
+
* ```js
|
|
69
|
+
* {
|
|
70
|
+
* retryOptions: {
|
|
71
|
+
* maxRetries: 4
|
|
72
|
+
* },
|
|
73
|
+
* trackLastEnqueuedEventProperties: false,
|
|
74
|
+
* skipParsingBodyAsJson: true
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export interface PartitionReceiverOptions {
|
|
80
|
+
/**
|
|
81
|
+
* The owner level associated with an exclusive consumer.
|
|
82
|
+
*
|
|
83
|
+
* When provided, the owner level indicates that a consumer is intended to be the exclusive receiver of events for the
|
|
84
|
+
* requested partition and the associated consumer group.
|
|
85
|
+
* When multiple consumers exist for the same partition/consumer group pair, then the ones with lower or no
|
|
86
|
+
* `ownerLevel` will get a `ReceiverDisconnectedError` during the next attempted receive operation.
|
|
87
|
+
*/
|
|
88
|
+
ownerLevel?: number;
|
|
89
|
+
/**
|
|
90
|
+
* The retry options used to govern retry attempts when an issue is encountered while receiving events.
|
|
91
|
+
* If no value is provided here, the retry options set when creating the `EventHubClient` is used.
|
|
92
|
+
*/
|
|
93
|
+
retryOptions?: RetryOptions;
|
|
94
|
+
/**
|
|
95
|
+
* Indicates whether or not the consumer should request information on the last enqueued event on its
|
|
96
|
+
* associated partition, and track that information as events are received.
|
|
97
|
+
|
|
98
|
+
* When information about the partition's last enqueued event is being tracked, each event received
|
|
99
|
+
* from the Event Hubs service will carry metadata about the partition that it otherwise would not. This results in a small amount of
|
|
100
|
+
* additional network bandwidth consumption that is generally a favorable trade-off when considered
|
|
101
|
+
* against periodically making requests for partition properties using the Event Hub client.
|
|
102
|
+
*/
|
|
103
|
+
trackLastEnqueuedEventProperties?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Option to disable the client from running JSON.parse() on the message body when receiving the message.
|
|
106
|
+
* Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you
|
|
107
|
+
* prefer to work directly with the bytes present in the message body than have the client attempt to parse it.
|
|
108
|
+
*/
|
|
109
|
+
skipParsingBodyAsJson?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The count of events requested eagerly and queued without regard to whether a read was requested.
|
|
112
|
+
*/
|
|
113
|
+
prefetchCount?: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
export interface IdempotentLinkProperties {
|
|
119
|
+
[idempotentProducerAmqpPropertyNames.epoch]: Typed | null;
|
|
120
|
+
[idempotentProducerAmqpPropertyNames.producerId]: Typed | null;
|
|
121
|
+
[idempotentProducerAmqpPropertyNames.producerSequenceNumber]: Typed | null;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The set of options that can be specified for an `EventHubProducerClient`
|
|
125
|
+
* to influence its behavior when publishing directly to an Event Hub partition.
|
|
126
|
+
*
|
|
127
|
+
* These options are ignored when publishing to the Event Hubs gateway for automatic
|
|
128
|
+
* routing or when using a partition key.
|
|
129
|
+
*/
|
|
130
|
+
export interface PartitionPublishingOptions {
|
|
131
|
+
/**
|
|
132
|
+
* The owner level indicates that a publishing is intended to be performed exclusively for events in the
|
|
133
|
+
* requested partition in the context of the associated producer group.
|
|
134
|
+
*
|
|
135
|
+
* To do so, publishing will attempt to assert ownership over the partition;
|
|
136
|
+
* in the case where more than one publisher in the producer group attempts to assert ownership for the same partition,
|
|
137
|
+
* the one having a larger `ownerLevel` value will "win".
|
|
138
|
+
*/
|
|
139
|
+
ownerLevel?: number;
|
|
140
|
+
/**
|
|
141
|
+
* The identifier of the producer group that this producer is associated with when publishing to the associated partition.
|
|
142
|
+
* Events will be published in the context of this group.
|
|
143
|
+
*
|
|
144
|
+
* If `undefined`, the Event Hubs service will control the value.
|
|
145
|
+
*
|
|
146
|
+
* The producer group is only recognized and relevant when certain features of the producer are enabled.
|
|
147
|
+
* For example, it is used by idempotent publishing.
|
|
148
|
+
*/
|
|
149
|
+
producerGroupId?: number;
|
|
150
|
+
/**
|
|
151
|
+
* The starting number that should be used for the automatic sequencing of events for the associated partition, when published by this producer.
|
|
152
|
+
*
|
|
153
|
+
* If `undefined`, the Event Hubs service will control the value.
|
|
154
|
+
*
|
|
155
|
+
* The producer group is only recognized and relevant when certain features of the producer are enabled.
|
|
156
|
+
* For example, it is used by idempotent publishing.
|
|
157
|
+
*/
|
|
158
|
+
startingSequenceNumber?: number;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Describes the information about the state of publishing for a partition.
|
|
162
|
+
*/
|
|
163
|
+
export interface PartitionPublishingProperties {
|
|
164
|
+
/**
|
|
165
|
+
* Indicates whether or not idempotent publishing is enabled for the producer and, by extension, the associated partition.
|
|
166
|
+
*/
|
|
167
|
+
isIdempotentPublishingEnabled: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* The owner level of the producer publishing to the associated partition.
|
|
170
|
+
*/
|
|
171
|
+
ownerLevel?: number;
|
|
172
|
+
/**
|
|
173
|
+
* The partition id the properties are associated with.
|
|
174
|
+
*/
|
|
175
|
+
partitionId: string;
|
|
176
|
+
/**
|
|
177
|
+
* The identifier of the producer group for which this producer is publishing to the associated partition.
|
|
178
|
+
*/
|
|
179
|
+
producerGroupId?: number;
|
|
180
|
+
/**
|
|
181
|
+
* The sequence number assigned to the event that was most recently published to the associated partition successfully.
|
|
182
|
+
*/
|
|
183
|
+
lastPublishedSequenceNumber?: number;
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=private.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private.d.ts","sourceRoot":"","sources":["../../../src/models/private.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAChG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAC;AAEhF;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,uBAAuB,GAAG,iBAAiB,GAAG,wBAAwB,CAAC;AAEpG;;GAEG;AACH,MAAM,WAAW,2BACf,SAAQ,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,GAAG,sBAAsB,CAAC,CAAC,EAC/E,IAAI,CACF,gBAAgB,EAChB,OAAO,CACL,MAAM,gBAAgB,EAEtB,cAAc,GAAG,sBAAsB,CACxC,CACF;IACH;;OAEG;IACH,qBAAqB,EAAE,qBAAqB,CAAC;IAE7C;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;;;;;OAQG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,CAAC,mCAAmC,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC1D,CAAC,mCAAmC,CAAC,UAAU,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC/D,CAAC,mCAAmC,CAAC,sBAAsB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CAC5E;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,6BAA6B,EAAE,OAAO,CAAC;IACvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private.js","sourceRoot":"","sources":["../../../src/models/private.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { LoadBalancingStrategy } from \"../loadBalancerStrategies/loadBalancingStrategy.js\";\nimport type { RetryOptions } from \"@azure/core-amqp\";\nimport type { Typed } from \"rhea-promise\";\nimport type { SubscribeOptions } from \"../eventHubConsumerClientModels.js\";\nimport type { idempotentProducerAmqpPropertyNames } from \"../util/constants.js\";\n\n/**\n * The set of options to configure the behavior of an `EventHubProducer`.\n * These can be specified when creating the producer via the `createProducer` method.\n * - `partitionId` : The string identifier of the partition that the producer can be bound to.\n * - `retryOptions` : The retry options used to govern retry attempts when an issue is encountered while sending events.\n * A simple usage can be `{ \"maxRetries\": 4 }`.\n * @internal\n */\nexport interface EventHubProducerOptions {\n /**\n * The identifier of the partition that the producer will be bound to.\n * If a value is provided, all events sent using the producer will reach the same partition.\n * If no value is provided, the service will determine the partition to which the event will be sent.\n */\n partitionId?: string;\n /**\n * The retry options used to govern retry attempts when an issue is encountered while sending events.\n * If no value is provided here, the retry options set when creating the `EventHubClient` is used.\n */\n retryOptions?: RetryOptions;\n}\n\n/**\n * @internal\n */\nexport type OperationNames = \"getEventHubProperties\" | \"getPartitionIds\" | \"getPartitionProperties\";\n\n/**\n * @internal\n */\nexport interface CommonEventProcessorOptions\n extends Required<Pick<SubscribeOptions, \"maxBatchSize\" | \"maxWaitTimeInSeconds\">>,\n Pick<\n SubscribeOptions,\n Exclude<\n keyof SubscribeOptions,\n // (made required above)\n \"maxBatchSize\" | \"maxWaitTimeInSeconds\"\n >\n > {\n /**\n * A load balancing strategy that determines how to claim partitions.\n */\n loadBalancingStrategy: LoadBalancingStrategy;\n\n /**\n * An optional ownerId to use rather than using an internally generated ID\n * This allows you to logically group a series of processors together (for instance\n * like we do with EventHubConsumerClient)\n */\n ownerId?: string;\n\n /**\n * The maximum amount of time since a PartitionOwnership was updated\n * to use to determine if a partition is no longer claimed.\n * Setting this value to 0 will cause the default value to be used.\n */\n inactiveTimeLimitInMs?: number;\n /**\n * Retry Options to be used when receiving events\n */\n retryOptions?: RetryOptions;\n}\n\n/**\n * The set of options to configure the behavior of an `EventHubConsumer`.\n * These can be specified when creating the consumer using the `createConsumer` method.\n * - `ownerLevel` : A number indicating that the consumer intends to be an exclusive consumer of events resulting in other\n * consumers to fail if their `ownerLevel` is lower or doesn't exist.\n * - `retryOptions`: The retry options used to govern retry attempts when an issue is encountered while receiving events.\n * A simple usage can be `{ \"maxRetries\": 4 }`.\n * - `skipParsingBodyAsJson` : Option to disable the client from running JSON.parse() on the message body when receiving the message.\n * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you prefer to work directly with\n * the bytes present in the message body than have the client attempt to parse it.\n *\n * Example usage:\n * ```js\n * {\n * retryOptions: {\n * maxRetries: 4\n * },\n * trackLastEnqueuedEventProperties: false,\n * skipParsingBodyAsJson: true\n * }\n * ```\n * @internal\n */\nexport interface PartitionReceiverOptions {\n /**\n * The owner level associated with an exclusive consumer.\n *\n * When provided, the owner level indicates that a consumer is intended to be the exclusive receiver of events for the\n * requested partition and the associated consumer group.\n * When multiple consumers exist for the same partition/consumer group pair, then the ones with lower or no\n * `ownerLevel` will get a `ReceiverDisconnectedError` during the next attempted receive operation.\n */\n ownerLevel?: number;\n /**\n * The retry options used to govern retry attempts when an issue is encountered while receiving events.\n * If no value is provided here, the retry options set when creating the `EventHubClient` is used.\n */\n retryOptions?: RetryOptions;\n /**\n * Indicates whether or not the consumer should request information on the last enqueued event on its\n * associated partition, and track that information as events are received.\n\n * When information about the partition's last enqueued event is being tracked, each event received\n * from the Event Hubs service will carry metadata about the partition that it otherwise would not. This results in a small amount of\n * additional network bandwidth consumption that is generally a favorable trade-off when considered\n * against periodically making requests for partition properties using the Event Hub client.\n */\n trackLastEnqueuedEventProperties?: boolean;\n /**\n * Option to disable the client from running JSON.parse() on the message body when receiving the message.\n * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you\n * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.\n */\n skipParsingBodyAsJson?: boolean;\n /**\n * The count of events requested eagerly and queued without regard to whether a read was requested.\n */\n prefetchCount?: number;\n}\n\n/**\n * @internal\n */\nexport interface IdempotentLinkProperties {\n [idempotentProducerAmqpPropertyNames.epoch]: Typed | null;\n [idempotentProducerAmqpPropertyNames.producerId]: Typed | null;\n [idempotentProducerAmqpPropertyNames.producerSequenceNumber]: Typed | null;\n}\n\n/**\n * The set of options that can be specified for an `EventHubProducerClient`\n * to influence its behavior when publishing directly to an Event Hub partition.\n *\n * These options are ignored when publishing to the Event Hubs gateway for automatic\n * routing or when using a partition key.\n */\nexport interface PartitionPublishingOptions {\n /**\n * The owner level indicates that a publishing is intended to be performed exclusively for events in the\n * requested partition in the context of the associated producer group.\n *\n * To do so, publishing will attempt to assert ownership over the partition;\n * in the case where more than one publisher in the producer group attempts to assert ownership for the same partition,\n * the one having a larger `ownerLevel` value will \"win\".\n */\n ownerLevel?: number;\n /**\n * The identifier of the producer group that this producer is associated with when publishing to the associated partition.\n * Events will be published in the context of this group.\n *\n * If `undefined`, the Event Hubs service will control the value.\n *\n * The producer group is only recognized and relevant when certain features of the producer are enabled.\n * For example, it is used by idempotent publishing.\n */\n producerGroupId?: number;\n /**\n * The starting number that should be used for the automatic sequencing of events for the associated partition, when published by this producer.\n *\n * If `undefined`, the Event Hubs service will control the value.\n *\n * The producer group is only recognized and relevant when certain features of the producer are enabled.\n * For example, it is used by idempotent publishing.\n */\n startingSequenceNumber?: number;\n}\n\n/**\n * Describes the information about the state of publishing for a partition.\n */\nexport interface PartitionPublishingProperties {\n /**\n * Indicates whether or not idempotent publishing is enabled for the producer and, by extension, the associated partition.\n */\n isIdempotentPublishingEnabled: boolean;\n /**\n * The owner level of the producer publishing to the associated partition.\n */\n ownerLevel?: number;\n /**\n * The partition id the properties are associated with.\n */\n partitionId: string;\n /**\n * The identifier of the producer group for which this producer is publishing to the associated partition.\n */\n producerGroupId?: number;\n /**\n * The sequence number assigned to the event that was most recently published to the associated partition successfully.\n */\n lastPublishedSequenceNumber?: number;\n}\n"]}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import type { RetryOptions, WebSocketOptions } from "@azure/core-amqp";
|
|
2
|
+
import type { OperationOptions } from "../util/operationOptions.js";
|
|
3
|
+
/**
|
|
4
|
+
* The set of options to configure the behavior of `getEventHubProperties`.
|
|
5
|
+
* - `abortSignal` : An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
|
6
|
+
* - `parentSpan` : The `Span` or `SpanContext` to use as the `parent` of the span created while calling this operation.
|
|
7
|
+
*/
|
|
8
|
+
export interface GetEventHubPropertiesOptions extends OperationOptions {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The set of options to configure the behavior of `getPartitionProperties`.
|
|
12
|
+
* - `abortSignal` : An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
|
13
|
+
* - `parentSpan` : The `Span` or `SpanContext` to use as the `parent` of the span created while calling this operation.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetPartitionPropertiesOptions extends OperationOptions {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The set of options to configure the behavior of `getPartitionIds`.
|
|
19
|
+
* - `abortSignal` : An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
|
20
|
+
* - `parentSpan` : The `Span` or `SpanContext` to use as the `parent` of the span created while calling this operation.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetPartitionIdsOptions extends OperationOptions {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Options to configure the `sendBatch` method on the `EventHubProducerClient`
|
|
26
|
+
* when sending an array of events.
|
|
27
|
+
* If `partitionId` is set, `partitionKey` must not be set and vice versa.
|
|
28
|
+
*
|
|
29
|
+
* - `partitionId` : The partition this batch will be sent to.
|
|
30
|
+
* - `partitionKey` : A value that is hashed to produce a partition assignment.
|
|
31
|
+
* - `abortSignal` : A signal used to cancel the send operation.
|
|
32
|
+
*/
|
|
33
|
+
export interface SendBatchOptions extends OperationOptions {
|
|
34
|
+
/**
|
|
35
|
+
* The partition this batch will be sent to.
|
|
36
|
+
* If this value is set then partitionKey can not be set.
|
|
37
|
+
*/
|
|
38
|
+
partitionId?: string;
|
|
39
|
+
/**
|
|
40
|
+
* A value that is hashed to produce a partition assignment.
|
|
41
|
+
* It guarantees that messages with the same partitionKey end up in the same partition.
|
|
42
|
+
* Specifying this will throw an error if the producer was created using a `partitionId`.
|
|
43
|
+
*/
|
|
44
|
+
partitionKey?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The set of options to configure the `send` operation on the `EventHubProducer`.
|
|
48
|
+
* - `partitionKey` : A value that is hashed to produce a partition assignment.
|
|
49
|
+
* - `abortSignal` : A signal used to cancel the send operation.
|
|
50
|
+
*
|
|
51
|
+
* Example usage:
|
|
52
|
+
* ```js
|
|
53
|
+
* {
|
|
54
|
+
* partitionKey: 'foo'
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export interface SendOptions extends OperationOptions {
|
|
61
|
+
/**
|
|
62
|
+
* A value that is hashed to produce a partition assignment.
|
|
63
|
+
* It guarantees that messages with the same partitionKey end up in the same partition.
|
|
64
|
+
* Specifying this will throw an error if the producer was created using a `partitionId`.
|
|
65
|
+
*/
|
|
66
|
+
partitionKey?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* An enum representing the different reasons for an `EventHubConsumerClient` to stop processing
|
|
70
|
+
* events from a partition in a consumer group of an Event Hub.
|
|
71
|
+
*/
|
|
72
|
+
export declare enum CloseReason {
|
|
73
|
+
/**
|
|
74
|
+
* Ownership of the partition was lost or transitioned to a new processor instance.
|
|
75
|
+
*/
|
|
76
|
+
OwnershipLost = "OwnershipLost",
|
|
77
|
+
/**
|
|
78
|
+
* The EventProcessor was shutdown.
|
|
79
|
+
*/
|
|
80
|
+
Shutdown = "Shutdown"
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Describes the options that can be provided while creating the EventHubClient.
|
|
84
|
+
* - `userAgent` : A string to append to the built in user agent string that is passed as a connection property
|
|
85
|
+
* to the service.
|
|
86
|
+
* - `webSocketOptions` : Options to configure the channelling of the AMQP connection over Web Sockets.
|
|
87
|
+
* - `websocket` : The WebSocket constructor used to create an AMQP connection if you choose to make the connection
|
|
88
|
+
* over a WebSocket.
|
|
89
|
+
* - `webSocketConstructorOptions` : Options to pass to the Websocket constructor when you choose to make the connection
|
|
90
|
+
* over a WebSocket.
|
|
91
|
+
* - `retryOptions` : The retry options for all the operations on the client/producer/consumer.
|
|
92
|
+
* - `maxRetries` : The number of times the operation can be retried in case of a retryable error.
|
|
93
|
+
* - `maxRetryDelayInMs`: The maximum delay between retries. Applicable only when performing exponential retries.
|
|
94
|
+
* - `mode`: Which retry mode to apply, specified by the `RetryMode` enum. Options are `Exponential` and `Fixed`. Defaults to `Fixed`.
|
|
95
|
+
* - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`,
|
|
96
|
+
* this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.
|
|
97
|
+
* - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any
|
|
98
|
+
* retry attempts remaining. Default value: 60000 milliseconds.
|
|
99
|
+
*
|
|
100
|
+
* A simple usage can be `{ "maxRetries": 4 }`.
|
|
101
|
+
*
|
|
102
|
+
* Example usage:
|
|
103
|
+
* ```js
|
|
104
|
+
* {
|
|
105
|
+
* retryOptions: {
|
|
106
|
+
* maxRetries: 4
|
|
107
|
+
* }
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export interface EventHubClientOptions {
|
|
112
|
+
/**
|
|
113
|
+
* A custom endpoint to use when connecting to the Event Hubs service.
|
|
114
|
+
* This can be useful when your network does not allow connecting to the
|
|
115
|
+
* standard Azure Event Hubs endpoint address, but does allow connecting
|
|
116
|
+
* through an intermediary.
|
|
117
|
+
*
|
|
118
|
+
* Example: "https://my.custom.endpoint:100/"
|
|
119
|
+
*/
|
|
120
|
+
customEndpointAddress?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Options to configure the retry policy for all the operations on the client.
|
|
123
|
+
* For example, `{ "maxRetries": 4 }` or `{ "maxRetries": 4, "retryDelayInMs": 30000 }`.
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
retryOptions?: RetryOptions;
|
|
127
|
+
/**
|
|
128
|
+
* Options to configure the channelling of the AMQP connection over Web Sockets.
|
|
129
|
+
*/
|
|
130
|
+
webSocketOptions?: WebSocketOptions;
|
|
131
|
+
/**
|
|
132
|
+
* Value that is appended to the built in user agent string that is passed to the Event Hubs service.
|
|
133
|
+
*/
|
|
134
|
+
userAgent?: string;
|
|
135
|
+
/**
|
|
136
|
+
* A unique name used to identify the client. If not provided, a GUID will be used as the identifier
|
|
137
|
+
*/
|
|
138
|
+
identifier?: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Describes the options that can be provided while creating the EventHubConsumerClient.
|
|
142
|
+
* - `loadBalancingOptions`: Options to tune how the EventHubConsumerClient claims partitions.
|
|
143
|
+
* - `userAgent` : A string to append to the built in user agent string that is passed as a connection property
|
|
144
|
+
* to the service.
|
|
145
|
+
* - `webSocketOptions` : Options to configure the channelling of the AMQP connection over Web Sockets.
|
|
146
|
+
* - `websocket` : The WebSocket constructor used to create an AMQP connection if you choose to make the connection
|
|
147
|
+
* over a WebSocket.
|
|
148
|
+
* - `webSocketConstructorOptions` : Options to pass to the Websocket constructor when you choose to make the connection
|
|
149
|
+
* over a WebSocket.
|
|
150
|
+
* - `retryOptions` : The retry options for all the operations on the client/producer/consumer.
|
|
151
|
+
* - `maxRetries` : The number of times the operation can be retried in case of a retryable error.
|
|
152
|
+
* - `maxRetryDelayInMs`: The maximum delay between retries. Applicable only when performing exponential retries.
|
|
153
|
+
* - `mode`: Which retry mode to apply, specified by the `RetryMode` enum. Options are `Exponential` and `Fixed`. Defaults to `Fixed`.
|
|
154
|
+
* - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`,
|
|
155
|
+
* this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.
|
|
156
|
+
* - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any
|
|
157
|
+
* retry attempts remaining. Default value: 60000 milliseconds.
|
|
158
|
+
*
|
|
159
|
+
* A simple usage can be `{ "maxRetries": 4 }`.
|
|
160
|
+
*
|
|
161
|
+
* Example usage:
|
|
162
|
+
* ```js
|
|
163
|
+
* {
|
|
164
|
+
* retryOptions: {
|
|
165
|
+
* maxRetries: 4
|
|
166
|
+
* }
|
|
167
|
+
* }
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
export interface EventHubConsumerClientOptions extends EventHubClientOptions {
|
|
171
|
+
/**
|
|
172
|
+
* Options to tune how the EventHubConsumerClient claims partitions.
|
|
173
|
+
*/
|
|
174
|
+
loadBalancingOptions?: LoadBalancingOptions;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* An options bag to configure load balancing settings.
|
|
178
|
+
*/
|
|
179
|
+
export interface LoadBalancingOptions {
|
|
180
|
+
/**
|
|
181
|
+
* Whether to apply a greedy or a more balanced approach when
|
|
182
|
+
* claiming partitions.
|
|
183
|
+
*
|
|
184
|
+
* - balanced: The `EventHubConsumerClient` will take a measured approach to
|
|
185
|
+
* requesting partition ownership when balancing work with other clients,
|
|
186
|
+
* slowly claiming partitions until a stabilized distribution is achieved.
|
|
187
|
+
*
|
|
188
|
+
* - greedy: The `EventHubConsumerClient` will attempt to claim ownership
|
|
189
|
+
* of its fair share of partitions aggressively when balancing work with
|
|
190
|
+
* other clients.
|
|
191
|
+
*
|
|
192
|
+
* This option is ignored when either:
|
|
193
|
+
* - `CheckpointStore` is __not__ provided to the `EventHubConsumerClient`.
|
|
194
|
+
* - `subscribe()` is called for a single partition.
|
|
195
|
+
* Default: balanced
|
|
196
|
+
*/
|
|
197
|
+
strategy?: "balanced" | "greedy";
|
|
198
|
+
/**
|
|
199
|
+
* The length of time between attempts to claim partitions.
|
|
200
|
+
* Default: 10000
|
|
201
|
+
*/
|
|
202
|
+
updateIntervalInMs?: number;
|
|
203
|
+
/**
|
|
204
|
+
* The length of time a partition claim is valid.
|
|
205
|
+
* Default: 60000
|
|
206
|
+
*/
|
|
207
|
+
partitionOwnershipExpirationIntervalInMs?: number;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Options to configure the `createBatch` method on the `EventHubProducerClient`.
|
|
211
|
+
* - `partitionKey` : A value that is hashed to produce a partition assignment.
|
|
212
|
+
* - `maxSizeInBytes`: The upper limit for the size of batch.
|
|
213
|
+
* - `abortSignal` : A signal the request to cancel the send operation.
|
|
214
|
+
*
|
|
215
|
+
* Example usage:
|
|
216
|
+
* ```js
|
|
217
|
+
* {
|
|
218
|
+
* partitionKey: 'foo',
|
|
219
|
+
* maxSizeInBytes: 1024 * 1024 // 1 MB
|
|
220
|
+
* }
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
export interface CreateBatchOptions extends OperationOptions {
|
|
224
|
+
/**
|
|
225
|
+
* A value that is hashed to produce a partition assignment. It guarantees that messages
|
|
226
|
+
* with the same partitionKey end up in the same partition.
|
|
227
|
+
* If this value is set then partitionId can not be set.
|
|
228
|
+
*/
|
|
229
|
+
partitionKey?: string;
|
|
230
|
+
/**
|
|
231
|
+
* The partition this batch will be sent to.
|
|
232
|
+
* If this value is set then partitionKey can not be set.
|
|
233
|
+
*/
|
|
234
|
+
partitionId?: string;
|
|
235
|
+
/**
|
|
236
|
+
* The upper limit for the size of batch. The `tryAdd` function will return `false` after this limit is reached.
|
|
237
|
+
*/
|
|
238
|
+
maxSizeInBytes?: number;
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/models/public.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;;GAIG;AACH,MAAM,WAAW,4BAA6B,SAAQ,gBAAgB;CAAG;AAEzE;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;CAAG;AAE1E;;;;GAIG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;CAAG;AAEnE;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACnD;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,aAAa,kBAAkB;IAC/B;;OAEG;IACH,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,6BAA8B,SAAQ,qBAAqB;IAC1E;;OAEG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACjC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,wCAAwC,CAAC,EAAE,MAAM,CAAC;CACnD;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
/**
|
|
4
|
+
* An enum representing the different reasons for an `EventHubConsumerClient` to stop processing
|
|
5
|
+
* events from a partition in a consumer group of an Event Hub.
|
|
6
|
+
*/
|
|
7
|
+
export var CloseReason;
|
|
8
|
+
(function (CloseReason) {
|
|
9
|
+
/**
|
|
10
|
+
* Ownership of the partition was lost or transitioned to a new processor instance.
|
|
11
|
+
*/
|
|
12
|
+
CloseReason["OwnershipLost"] = "OwnershipLost";
|
|
13
|
+
/**
|
|
14
|
+
* The EventProcessor was shutdown.
|
|
15
|
+
*/
|
|
16
|
+
CloseReason["Shutdown"] = "Shutdown";
|
|
17
|
+
})(CloseReason || (CloseReason = {}));
|
|
18
|
+
//# sourceMappingURL=public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/models/public.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAwElC;;;GAGG;AACH,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB;;OAEG;IACH,8CAA+B,CAAA;IAC/B;;OAEG;IACH,oCAAqB,CAAA;AACvB,CAAC,EATW,WAAW,KAAX,WAAW,QAStB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RetryOptions, WebSocketOptions } from \"@azure/core-amqp\";\nimport type { OperationOptions } from \"../util/operationOptions.js\";\n\n/**\n * The set of options to configure the behavior of `getEventHubProperties`.\n * - `abortSignal` : An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * - `parentSpan` : The `Span` or `SpanContext` to use as the `parent` of the span created while calling this operation.\n */\nexport interface GetEventHubPropertiesOptions extends OperationOptions {}\n\n/**\n * The set of options to configure the behavior of `getPartitionProperties`.\n * - `abortSignal` : An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * - `parentSpan` : The `Span` or `SpanContext` to use as the `parent` of the span created while calling this operation.\n */\nexport interface GetPartitionPropertiesOptions extends OperationOptions {}\n\n/**\n * The set of options to configure the behavior of `getPartitionIds`.\n * - `abortSignal` : An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * - `parentSpan` : The `Span` or `SpanContext` to use as the `parent` of the span created while calling this operation.\n */\nexport interface GetPartitionIdsOptions extends OperationOptions {}\n\n/**\n * Options to configure the `sendBatch` method on the `EventHubProducerClient`\n * when sending an array of events.\n * If `partitionId` is set, `partitionKey` must not be set and vice versa.\n *\n * - `partitionId` : The partition this batch will be sent to.\n * - `partitionKey` : A value that is hashed to produce a partition assignment.\n * - `abortSignal` : A signal used to cancel the send operation.\n */\nexport interface SendBatchOptions extends OperationOptions {\n /**\n * The partition this batch will be sent to.\n * If this value is set then partitionKey can not be set.\n */\n partitionId?: string;\n /**\n * A value that is hashed to produce a partition assignment.\n * It guarantees that messages with the same partitionKey end up in the same partition.\n * Specifying this will throw an error if the producer was created using a `partitionId`.\n */\n partitionKey?: string;\n}\n\n/**\n * The set of options to configure the `send` operation on the `EventHubProducer`.\n * - `partitionKey` : A value that is hashed to produce a partition assignment.\n * - `abortSignal` : A signal used to cancel the send operation.\n *\n * Example usage:\n * ```js\n * {\n * partitionKey: 'foo'\n * }\n * ```\n *\n * @internal\n */\nexport interface SendOptions extends OperationOptions {\n /**\n * A value that is hashed to produce a partition assignment.\n * It guarantees that messages with the same partitionKey end up in the same partition.\n * Specifying this will throw an error if the producer was created using a `partitionId`.\n */\n partitionKey?: string;\n}\n\n/**\n * An enum representing the different reasons for an `EventHubConsumerClient` to stop processing\n * events from a partition in a consumer group of an Event Hub.\n */\nexport enum CloseReason {\n /**\n * Ownership of the partition was lost or transitioned to a new processor instance.\n */\n OwnershipLost = \"OwnershipLost\",\n /**\n * The EventProcessor was shutdown.\n */\n Shutdown = \"Shutdown\",\n}\n\n/**\n * Describes the options that can be provided while creating the EventHubClient.\n * - `userAgent` : A string to append to the built in user agent string that is passed as a connection property\n * to the service.\n * - `webSocketOptions` : Options to configure the channelling of the AMQP connection over Web Sockets.\n * - `websocket` : The WebSocket constructor used to create an AMQP connection if you choose to make the connection\n * over a WebSocket.\n * - `webSocketConstructorOptions` : Options to pass to the Websocket constructor when you choose to make the connection\n * over a WebSocket.\n * - `retryOptions` : The retry options for all the operations on the client/producer/consumer.\n * - `maxRetries` : The number of times the operation can be retried in case of a retryable error.\n * - `maxRetryDelayInMs`: The maximum delay between retries. Applicable only when performing exponential retries.\n * - `mode`: Which retry mode to apply, specified by the `RetryMode` enum. Options are `Exponential` and `Fixed`. Defaults to `Fixed`.\n * - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`,\n * this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.\n * - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any\n * retry attempts remaining. Default value: 60000 milliseconds.\n *\n * A simple usage can be `{ \"maxRetries\": 4 }`.\n *\n * Example usage:\n * ```js\n * {\n * retryOptions: {\n * maxRetries: 4\n * }\n * }\n * ```\n */\nexport interface EventHubClientOptions {\n /**\n * A custom endpoint to use when connecting to the Event Hubs service.\n * This can be useful when your network does not allow connecting to the\n * standard Azure Event Hubs endpoint address, but does allow connecting\n * through an intermediary.\n *\n * Example: \"https://my.custom.endpoint:100/\"\n */\n customEndpointAddress?: string;\n /**\n * Options to configure the retry policy for all the operations on the client.\n * For example, `{ \"maxRetries\": 4 }` or `{ \"maxRetries\": 4, \"retryDelayInMs\": 30000 }`.\n *\n */\n retryOptions?: RetryOptions;\n /**\n * Options to configure the channelling of the AMQP connection over Web Sockets.\n */\n webSocketOptions?: WebSocketOptions;\n /**\n * Value that is appended to the built in user agent string that is passed to the Event Hubs service.\n */\n userAgent?: string;\n /**\n * A unique name used to identify the client. If not provided, a GUID will be used as the identifier\n */\n identifier?: string;\n}\n\n/**\n * Describes the options that can be provided while creating the EventHubConsumerClient.\n * - `loadBalancingOptions`: Options to tune how the EventHubConsumerClient claims partitions.\n * - `userAgent` : A string to append to the built in user agent string that is passed as a connection property\n * to the service.\n * - `webSocketOptions` : Options to configure the channelling of the AMQP connection over Web Sockets.\n * - `websocket` : The WebSocket constructor used to create an AMQP connection if you choose to make the connection\n * over a WebSocket.\n * - `webSocketConstructorOptions` : Options to pass to the Websocket constructor when you choose to make the connection\n * over a WebSocket.\n * - `retryOptions` : The retry options for all the operations on the client/producer/consumer.\n * - `maxRetries` : The number of times the operation can be retried in case of a retryable error.\n * - `maxRetryDelayInMs`: The maximum delay between retries. Applicable only when performing exponential retries.\n * - `mode`: Which retry mode to apply, specified by the `RetryMode` enum. Options are `Exponential` and `Fixed`. Defaults to `Fixed`.\n * - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`,\n * this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.\n * - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any\n * retry attempts remaining. Default value: 60000 milliseconds.\n *\n * A simple usage can be `{ \"maxRetries\": 4 }`.\n *\n * Example usage:\n * ```js\n * {\n * retryOptions: {\n * maxRetries: 4\n * }\n * }\n * ```\n */\nexport interface EventHubConsumerClientOptions extends EventHubClientOptions {\n /**\n * Options to tune how the EventHubConsumerClient claims partitions.\n */\n loadBalancingOptions?: LoadBalancingOptions;\n}\n\n/**\n * An options bag to configure load balancing settings.\n */\nexport interface LoadBalancingOptions {\n /**\n * Whether to apply a greedy or a more balanced approach when\n * claiming partitions.\n *\n * - balanced: The `EventHubConsumerClient` will take a measured approach to\n * requesting partition ownership when balancing work with other clients,\n * slowly claiming partitions until a stabilized distribution is achieved.\n *\n * - greedy: The `EventHubConsumerClient` will attempt to claim ownership\n * of its fair share of partitions aggressively when balancing work with\n * other clients.\n *\n * This option is ignored when either:\n * - `CheckpointStore` is __not__ provided to the `EventHubConsumerClient`.\n * - `subscribe()` is called for a single partition.\n * Default: balanced\n */\n strategy?: \"balanced\" | \"greedy\";\n /**\n * The length of time between attempts to claim partitions.\n * Default: 10000\n */\n updateIntervalInMs?: number;\n /**\n * The length of time a partition claim is valid.\n * Default: 60000\n */\n partitionOwnershipExpirationIntervalInMs?: number;\n}\n\n/**\n * Options to configure the `createBatch` method on the `EventHubProducerClient`.\n * - `partitionKey` : A value that is hashed to produce a partition assignment.\n * - `maxSizeInBytes`: The upper limit for the size of batch.\n * - `abortSignal` : A signal the request to cancel the send operation.\n *\n * Example usage:\n * ```js\n * {\n * partitionKey: 'foo',\n * maxSizeInBytes: 1024 * 1024 // 1 MB\n * }\n * ```\n */\nexport interface CreateBatchOptions extends OperationOptions {\n /**\n * A value that is hashed to produce a partition assignment. It guarantees that messages\n * with the same partitionKey end up in the same partition.\n * If this value is set then partitionId can not be set.\n */\n partitionKey?: string;\n /**\n * The partition this batch will be sent to.\n * If this value is set then partitionKey can not be set.\n */\n partitionId?: string;\n /**\n * The upper limit for the size of batch. The `tryAdd` function will return `false` after this limit is reached.\n */\n maxSizeInBytes?: number;\n}\n"]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { BasicPartitionProperties, PartitionContext, SubscriptionEventHandlers } from "./eventHubConsumerClientModels.js";
|
|
2
|
+
import type { CheckpointStore } from "./eventProcessor.js";
|
|
3
|
+
import type { CloseReason } from "./models/public.js";
|
|
4
|
+
import type { LastEnqueuedEventProperties } from "./partitionReceiver.js";
|
|
5
|
+
import type { ReceivedEventData } from "./eventData.js";
|
|
6
|
+
/**
|
|
7
|
+
* A checkpoint is meant to represent the last successfully processed event by the user from a particular
|
|
8
|
+
* partition of a consumer group in an Event Hub instance.
|
|
9
|
+
*
|
|
10
|
+
* When the `updateCheckpoint()` method on the `PartitionProcessor` class is called by the user, a
|
|
11
|
+
* `Checkpoint` is created internally. It is then stored in the storage solution implemented by the
|
|
12
|
+
* `CheckpointManager` chosen by the user when creating an `EventProcessor`.
|
|
13
|
+
*
|
|
14
|
+
* Users are never expected to interact with `Checkpoint` directly. This interface exists to support the
|
|
15
|
+
* internal workings of `EventProcessor` and `CheckpointManager`.
|
|
16
|
+
**/
|
|
17
|
+
export interface Checkpoint {
|
|
18
|
+
/**
|
|
19
|
+
* The fully qualified Event Hubs namespace. This is likely to be similar to
|
|
20
|
+
* <yournamespace>.servicebus.windows.net
|
|
21
|
+
*/
|
|
22
|
+
fullyQualifiedNamespace: string;
|
|
23
|
+
/**
|
|
24
|
+
* The event hub name
|
|
25
|
+
*/
|
|
26
|
+
eventHubName: string;
|
|
27
|
+
/**
|
|
28
|
+
* The consumer group name
|
|
29
|
+
*/
|
|
30
|
+
consumerGroup: string;
|
|
31
|
+
/**
|
|
32
|
+
* The identifier of the Event Hub partition
|
|
33
|
+
*/
|
|
34
|
+
partitionId: string;
|
|
35
|
+
/**
|
|
36
|
+
* The sequence number of the event
|
|
37
|
+
*/
|
|
38
|
+
sequenceNumber: number;
|
|
39
|
+
/**
|
|
40
|
+
* The offset of the event.
|
|
41
|
+
*/
|
|
42
|
+
offset: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The `PartitionProcessor` is responsible for processing events received from Event Hubs when using `EventProcessor`
|
|
46
|
+
*
|
|
47
|
+
* The EventProcessor creates a new instance of the PartitionProcessor for each partition of the event hub it starts processing. When you extend the `PartitionProcessor` in order to customize it as you see fit,
|
|
48
|
+
* - Override the `processEvents()` method to add the code to process the received events. This is also a good place to update the checkpoints using the `updateCheckpoint()` method
|
|
49
|
+
* - Optionally override the `processError()` method to handle any error that might have occurred when processing the events.
|
|
50
|
+
* - Optionally override the `initialize()` method to implement any set up related tasks you would want to carry out before starting to receive events from the partition
|
|
51
|
+
* - Optionally override the `close()` method to implement any tear down or clean up tasks you would want to carry out.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare class PartitionProcessor implements PartitionContext {
|
|
55
|
+
private _eventHandlers;
|
|
56
|
+
private _checkpointStore;
|
|
57
|
+
private _context;
|
|
58
|
+
private _lastEnqueuedEventProperties?;
|
|
59
|
+
constructor(_eventHandlers: SubscriptionEventHandlers, _checkpointStore: CheckpointStore, _context: BasicPartitionProperties & {
|
|
60
|
+
eventProcessorId: string;
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Information on the last enqueued event in the partition that is being processed.
|
|
64
|
+
* This property is updated by the `EventProcessor` if the `trackLastEnqueuedEventProperties` option is set to true
|
|
65
|
+
* when creating an instance of EventProcessor
|
|
66
|
+
* @readonly
|
|
67
|
+
*/
|
|
68
|
+
get lastEnqueuedEventProperties(): LastEnqueuedEventProperties;
|
|
69
|
+
/**
|
|
70
|
+
* Information on the last enqueued event in the partition that is being processed.
|
|
71
|
+
* This property is updated by the `EventProcessor` if the `trackLastEnqueuedEventProperties` option is set to true
|
|
72
|
+
* when creating an instance of EventProcessor
|
|
73
|
+
*/
|
|
74
|
+
set lastEnqueuedEventProperties(properties: LastEnqueuedEventProperties);
|
|
75
|
+
/**
|
|
76
|
+
* The fully qualified namespace from where the current partition is being processed. It is set by the `EventProcessor`
|
|
77
|
+
* @readonly
|
|
78
|
+
*/
|
|
79
|
+
get fullyQualifiedNamespace(): string;
|
|
80
|
+
/**
|
|
81
|
+
* The name of the consumer group from where the current partition is being processed. It is set by the `EventProcessor`
|
|
82
|
+
* @readonly
|
|
83
|
+
*/
|
|
84
|
+
get consumerGroup(): string;
|
|
85
|
+
/**
|
|
86
|
+
* The name of the event hub to which the current partition belongs. It is set by the `EventProcessor`
|
|
87
|
+
* @readonly
|
|
88
|
+
*/
|
|
89
|
+
get eventHubName(): string;
|
|
90
|
+
/**
|
|
91
|
+
* The identifier of the Event Hub partition that is being processed. It is set by the `EventProcessor`
|
|
92
|
+
* @readonly
|
|
93
|
+
*/
|
|
94
|
+
get partitionId(): string;
|
|
95
|
+
/**
|
|
96
|
+
* The unique identifier of the `EventProcessor` that has spawned the current instance of `PartitionProcessor`. This is set by the `EventProcessor`
|
|
97
|
+
*/
|
|
98
|
+
get eventProcessorId(): string;
|
|
99
|
+
/**
|
|
100
|
+
* This method is called when the `EventProcessor` takes ownership of a new partition and before any
|
|
101
|
+
* events are received.
|
|
102
|
+
*/
|
|
103
|
+
initialize(): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* This method is called before the partition processor is closed by the EventProcessor.
|
|
106
|
+
*
|
|
107
|
+
* @param reason - The reason for closing this partition processor.
|
|
108
|
+
*/
|
|
109
|
+
close(reason: CloseReason): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* This method is called when new events are received.
|
|
112
|
+
*
|
|
113
|
+
* This is also a good place to update checkpoints as appropriate.
|
|
114
|
+
*
|
|
115
|
+
* @param event - The received events to be processed.
|
|
116
|
+
*/
|
|
117
|
+
processEvents(events: ReceivedEventData[]): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* This method is called when an error occurs while receiving events from Event Hubs.
|
|
120
|
+
*
|
|
121
|
+
* @param error - The error to be processed.
|
|
122
|
+
*/
|
|
123
|
+
processError(error: Error): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* Updates the checkpoint using the event data.
|
|
126
|
+
*
|
|
127
|
+
* A checkpoint is meant to represent the last successfully processed event by the user from a particular
|
|
128
|
+
* partition of a consumer group in an Event Hub instance.
|
|
129
|
+
*
|
|
130
|
+
* @param eventData - The event that you want to update the checkpoint with.
|
|
131
|
+
*/
|
|
132
|
+
updateCheckpoint(eventData: ReceivedEventData): Promise<void>;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=partitionProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partitionProcessor.d.ts","sourceRoot":"","sources":["../../src/partitionProcessor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,wBAAwB,EACxB,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD;;;;;;;;;;IAUI;AACJ,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,qBAAa,kBAAmB,YAAW,gBAAgB;IAIvD,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,QAAQ;IALlB,OAAO,CAAC,4BAA4B,CAAC,CAA8B;gBAGzD,cAAc,EAAE,yBAAyB,EACzC,gBAAgB,EAAE,eAAe,EACjC,QAAQ,EAAE,wBAAwB,GAAG;QAC3C,gBAAgB,EAAE,MAAM,CAAC;KAC1B;IAGH;;;;;OAKG;IACH,IAAW,2BAA2B,IAAI,2BAA2B,CAEpE;IAED;;;;OAIG;IACH,IAAW,2BAA2B,CAAC,UAAU,EAAE,2BAA2B,EAE7E;IAED;;;OAGG;IACH,IAAW,uBAAuB,IAAI,MAAM,CAE3C;IAED;;;OAGG;IACH,IAAW,aAAa,IAAI,MAAM,CAEjC;IAED;;;OAGG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;;OAGG;IACH,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED;;OAEG;IACH,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IAED;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjC;;;;OAIG;IACG,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAM/C;;;;;;OAMG;IACG,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/D;;;;OAIG;IACG,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAU/C;;;;;;;OAOG;IACU,gBAAgB,CAAC,SAAS,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAY3E"}
|