You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The focus of these changes is to add an option for setting an Identifier
for each Event Hubs client type. The identifier is informational and is
associated with the AMQP links used, allowing the service to provide additional
context in error messages and the SDK logs to provide an additional point
of correlation.
Copy file name to clipboardExpand all lines: sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
### Features Added
6
6
7
+
- Each Event Hubs client type now offers an option to set an Identifier. The identifier is informational and is associated with the AMQP links used, allowing the service to provide additional context in error messages and the SDK logs to provide an additional point of correlation.
Copy file name to clipboardExpand all lines: sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -403,13 +403,15 @@ public override async Task<PartitionProperties> GetPartitionPropertiesAsync(stri
403
403
/// </summary>
404
404
///
405
405
/// <param name="partitionId">The identifier of the partition to which the transport producer should be bound; if <c>null</c>, the producer is unbound.</param>
406
+
/// <param name="producerIdentifier">The identifier to associate with the consumer; if <c>null</c> or <see cref="string.Empty" />, a random identifier will be generated.</param>
406
407
/// <param name="requestedFeatures">The flags specifying the set of special transport features that should be opted-into.</param>
407
408
/// <param name="partitionOptions">The set of options, if any, that should be considered when initializing the producer.</param>
408
409
/// <param name="retryPolicy">The policy which governs retry behavior and try timeouts.</param>
409
410
///
410
411
/// <returns>A <see cref="TransportProducer"/> configured in the requested manner.</returns>
@@ -420,6 +422,7 @@ public override TransportProducer CreateProducer(string partitionId,
420
422
(
421
423
EventHubName,
422
424
partitionId,
425
+
producerIdentifier,
423
426
ConnectionScope,
424
427
MessageConverter,
425
428
retryPolicy,
@@ -447,6 +450,7 @@ public override TransportProducer CreateProducer(string partitionId,
447
450
///
448
451
/// <param name="consumerGroup">The name of the consumer group this consumer is associated with. Events are read in the context of this group.</param>
449
452
/// <param name="partitionId">The identifier of the Event Hub partition from which events will be received.</param>
453
+
/// <param name="consumerIdentifier">The identifier to associate with the consumer; if <c>null</c> or <see cref="string.Empty" />, a random identifier will be generated.</param>
450
454
/// <param name="eventPosition">The position within the partition where the consumer should begin reading events.</param>
451
455
/// <param name="retryPolicy">The policy which governs retry behavior and try timeouts.</param>
452
456
/// <param name="trackLastEnqueuedEventProperties">Indicates whether information on the last enqueued event on the partition is sent as events are received.</param>
@@ -459,6 +463,7 @@ public override TransportProducer CreateProducer(string partitionId,
Copy file name to clipboardExpand all lines: sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpConnectionScope.cs
+28-4Lines changed: 28 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -308,6 +308,7 @@ public virtual async Task<RequestResponseAmqpLink> OpenManagementLinkAsync(TimeS
308
308
/// <param name="prefetchSizeInBytes">The cache size of the prefetch queue. When set, the link makes a best effort to ensure prefetched messages fit into the specified size.</param>
309
309
/// <param name="ownerLevel">The relative priority to associate with the link; for a non-exclusive link, this value should be <c>null</c>.</param>
310
310
/// <param name="trackLastEnqueuedEventProperties">Indicates whether information on the last enqueued event on the partition is sent as events are received.</param>
311
+
/// <param name="linkIdentifier">The identifier to assign to the link; if <c>null</c> or <see cref="string.Empty" />, a random identifier will be generated.</param>
311
312
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> instance to signal the request to cancel the operation.</param>
312
313
///
313
314
/// <returns>A link for use with consumer operations.</returns>
@@ -320,6 +321,7 @@ public virtual async Task<ReceivingAmqpLink> OpenConsumerLinkAsync(string consum
@@ -350,6 +357,7 @@ public virtual async Task<ReceivingAmqpLink> OpenConsumerLinkAsync(string consum
350
357
prefetchSizeInBytes,
351
358
ownerLevel,
352
359
trackLastEnqueuedEventProperties,
360
+
linkIdentifier,
353
361
cancellationToken
354
362
).ConfigureAwait(false);
355
363
@@ -379,6 +387,7 @@ public virtual async Task<ReceivingAmqpLink> OpenConsumerLinkAsync(string consum
379
387
/// <param name="features">The set of features which are active for the producer requesting the link.</param>
380
388
/// <param name="options">The set of options to consider when creating the link.</param>
381
389
/// <param name="timeout">The timeout to apply when creating the link.</param>
390
+
/// <param name="linkIdentifier">The identifier to assign to the link; if <c>null</c> or <see cref="string.Empty" />, a random identifier will be generated.</param>
382
391
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> instance to signal the request to cancel the operation.</param>
383
392
///
384
393
/// <returns>A link for use with producer operations.</returns>
@@ -387,6 +396,7 @@ public virtual async Task<SendingAmqpLink> OpenProducerLinkAsync(string partitio
/// <param name="connection">The active and opened AMQP connection to use for this link.</param>
589
604
/// <param name="endpoint">The fully qualified endpoint to open the link for.</param>
605
+
/// <param name="timeout">The timeout to apply when creating the link.</param>
590
606
/// <param name="eventPosition">The position of the event in the partition where the link should be filtered to.</param>
591
607
/// <param name="prefetchCount">Controls the number of events received and queued locally without regard to whether an operation was requested.</param>
592
608
/// <param name="prefetchSizeInBytes">The cache size of the prefetch queue. When set, the link makes a best effort to ensure prefetched messages fit into the specified size.</param>
593
609
/// <param name="ownerLevel">The relative priority to associate with the link; for a non-exclusive link, this value should be <c>null</c>.</param>
594
610
/// <param name="trackLastEnqueuedEventProperties">Indicates whether information on the last enqueued event on the partition is sent as events are received.</param>
595
-
/// <param name="timeout">The timeout to apply when creating the link.</param>
611
+
/// <param name="linkIdentifier">The identifier to assign to the link; this is assumed to be a non-null value.</param>
596
612
/// <param name="cancellationToken">An optional <see cref="CancellationToken"/> instance to signal the request to cancel the operation.</param>
597
613
///
598
614
/// <returns>A link for use for operations related to receiving events.</returns>
0 commit comments