-
Notifications
You must be signed in to change notification settings - Fork 5.1k
API changes and batch schedule #12796
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
API changes and batch schedule #12796
Conversation
sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs
Outdated
Show resolved
Hide resolved
sdk/servicebus/Azure.Messaging.ServiceBus/samples/Sample01_HelloWorld.md
Outdated
Show resolved
Hide resolved
sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs
Outdated
Show resolved
Hide resolved
sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs
Outdated
Show resolved
Hide resolved
sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs
Outdated
Show resolved
Hide resolved
270e12a to
6137fda
Compare
sdk/servicebus/Azure.Messaging.ServiceBus/samples/Sample01_HelloWorld.md
Outdated
Show resolved
Hide resolved
| /// | ||
| /// <returns>List of messages received. Returns an empty list if no message is found.</returns> | ||
| public override async Task<IList<ServiceBusReceivedMessage>> ReceiveBatchAsync( | ||
| public override async Task<IList<ServiceBusReceivedMessage>> ReceiveMessagesAsync( |
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.
I like this change; It feels more natural and reads better to me.
| /// <param name="cancellationToken">An optional <see cref="CancellationToken"/> instance to signal the request to cancel the operation.</param> | ||
| /// | ||
| /// <returns>The batch of <see cref="ServiceBusMessage" /> from the Service Bus entity this receiver is associated with. If no messages are present, an empty list is returned.</returns> | ||
| /// <returns>The list of <see cref="ServiceBusMessage" /> from the Service Bus entity this receiver is associated with. If no messages are present, an empty list is returned.</returns> |
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.
Maybe consider "set" as a more neutral term? "List" makes me think concrete implementation, which isn't wrong here, given the IList return type, but the "list" form isn't really important in the context.
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.
I went back and forth on this but since it returns an IList, list feels appropriate. "Set" might also mean a concrete implementation to some. Alternatively, I can just cref the whole IList but that felt unnecesary.
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.
I'm good whichever way you feel is best.
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.
This might be something to look at in terms of consistency across the Track 2 libraries, as this surely isn't a new issue. Though HTTP libraries use AsyncPageable so the nomenclature would be different. I guess we should at least try to align across SB/EH.
| /// </summary> | ||
| /// | ||
| public class CreateBatchOptions | ||
| public class CreateMessageBatchOptions |
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.
I'm not sure that this rename offers much. Were we concerned that there would be confusion with another set of batch creation options?
I wouldn't think that this type is something that developers would need to discover from a list on its own, but would instead be guided by the parameter type/name when explicitly calling to create a batch. At that point, I think the purpose is clear.
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.
Well, we renamed the operation to CreateMessageBatchAsync, so this maintains consistency with that. Do you have the same concerns with renaming to CreateMessageBatchAsync?
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.
I do. I'm bucketing them both under the question "does adding more words add more clarity or just give readers more things to parse?" That said, I don't have particularly strong feelings.
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.
I think it adds more clarity and also consistency. We are now adding Message/Messages for all service operations that operate on a message. It would be strange to not do the same here.
Uh oh!
There was an error while loading. Please reload this page.