-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Sender updates #11580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sender updates #11580
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,8 +9,11 @@ | |
| namespace Azure.Messaging.ServiceBus | ||
| { | ||
| /// <summary> | ||
| /// A set of <see cref="ServiceBusMessageBatch" /> with size constraints known up-front, | ||
| /// A set of <see cref="ServiceBusMessage" /> with size constraints known up-front, | ||
| /// intended to be sent to the Queue/Topic as a single batch. | ||
| /// A <see cref="ServiceBusMessageBatch"/> can be created using | ||
| /// <see cref="ServiceBusSender.CreateBatchAsync(System.Threading.CancellationToken)"/>. | ||
| /// Messages can be added to the batch using the <see cref="TryAdd"/> method on the batch. | ||
|
||
| /// </summary> | ||
| /// | ||
| public sealed class ServiceBusMessageBatch : IDisposable | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.ComponentModel; | ||
|
|
||
| namespace Azure.Messaging.ServiceBus | ||
| { | ||
| /// <summary> | ||
| /// The set of options that can be specified when creating a <see cref="ServiceBusSender"/> | ||
| /// to configure its behavior. | ||
| /// </summary> | ||
| public class ServiceBusSenderOptions | ||
| { | ||
| /// <summary> | ||
| /// The queue or topic name to route the message through. This is useful when using transactions, in order | ||
| /// to allow for completing a transaction involving multiple entities. For instance, if you want to | ||
| /// settle a message on Entity A and send a message to Entity B as part of the same transaction, | ||
| /// you can use a <see cref="ServiceBusSender"/> for Entity B, with the <see cref="ViaQueueOrTopicName"/> | ||
| /// property set to Entity A. | ||
| /// </summary> | ||
| public string ViaQueueOrTopicName { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Determines whether the specified <see cref="System.Object" /> is equal to this instance. | ||
| /// </summary> | ||
| /// | ||
| /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param> | ||
| /// | ||
| /// <returns><c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.</returns> | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override bool Equals(object obj) => base.Equals(obj); | ||
|
|
||
| /// <summary> | ||
| /// Returns a hash code for this instance. | ||
| /// </summary> | ||
| /// | ||
| /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns> | ||
| /// | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override int GetHashCode() => base.GetHashCode(); | ||
|
|
||
| /// <summary> | ||
| /// Converts the instance to string representation. | ||
| /// </summary> | ||
| /// | ||
| /// <returns>A <see cref="System.String" /> that represents this instance.</returns> | ||
| /// | ||
| [EditorBrowsable(EditorBrowsableState.Never)] | ||
| public override string ToString() => base.ToString(); | ||
|
|
||
| /// <summary> | ||
| /// Creates a new copy of the current <see cref="ServiceBusSenderOptions" />, cloning its attributes into a new instance. | ||
| /// </summary> | ||
| /// | ||
| /// <returns>A new copy of <see cref="ServiceBusSenderOptions" />.</returns> | ||
| internal ServiceBusSenderOptions Clone() => | ||
| new ServiceBusSenderOptions | ||
| { | ||
| ViaQueueOrTopicName = ViaQueueOrTopicName | ||
| }; | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update SendBatchAsync -> SendAsync in the Sending messages section and in the description of Sending and receiving batch of messages?