-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Service Bus] Renames to use the messages suffix and remove singular alternatives #9678
Changes from all commits
90eeea6
fc3ce61
f3faca3
5283b4e
fa67dc0
a4c4e8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,10 +175,6 @@ export interface QueuesResponse extends Array<QueueDescription>, Response { | |
export interface QueuesRuntimeInfoResponse extends Array<QueueRuntimeInfo>, Response { | ||
} | ||
|
||
// @public | ||
export interface ReceiveBatchOptions extends OperationOptions, WaitTimeOptions { | ||
} | ||
|
||
// @public | ||
export interface ReceivedMessage extends ServiceBusMessage { | ||
readonly _amqpMessage: AmqpMessage; | ||
|
@@ -207,6 +203,10 @@ export interface ReceivedMessageWithLock extends ReceivedMessage { | |
renewLock(): Promise<Date>; | ||
} | ||
|
||
// @public | ||
export interface ReceiveMessagesOptions extends OperationOptions, WaitTimeOptions { | ||
} | ||
|
||
// @public | ||
export interface Receiver<ReceivedMessageT> { | ||
close(): Promise<void>; | ||
|
@@ -215,9 +215,8 @@ export interface Receiver<ReceivedMessageT> { | |
isClosed: boolean; | ||
isReceivingMessages(): boolean; | ||
peekMessages(options?: PeekMessagesOptions): Promise<ReceivedMessage[]>; | ||
receiveBatch(maxMessages: number, options?: ReceiveBatchOptions): Promise<ReceivedMessageT[]>; | ||
receiveDeferredMessage(sequenceNumber: Long, options?: OperationOptions): Promise<ReceivedMessageT | undefined>; | ||
receiveDeferredMessages(sequenceNumbers: Long[], options?: OperationOptions): Promise<ReceivedMessageT[]>; | ||
receiveDeferredMessages(sequenceNumbers: Long | Long[], options?: OperationOptions): Promise<ReceivedMessageT[]>; | ||
receiveMessages(maxMessages: number, options?: ReceiveMessagesOptions): Promise<ReceivedMessageT[]>; | ||
receiveMode: "peekLock" | "receiveAndDelete"; | ||
subscribe(handlers: MessageHandlers<ReceivedMessageT>, options?: SubscribeOptions): void; | ||
} | ||
|
@@ -246,18 +245,14 @@ export interface RulesResponse extends Array<RuleDescription>, Response { | |
|
||
// @public | ||
export interface Sender { | ||
cancelScheduledMessage(sequenceNumber: Long, options?: OperationOptions): Promise<void>; | ||
cancelScheduledMessages(sequenceNumbers: Long[], options?: OperationOptions): Promise<void>; | ||
cancelScheduledMessages(sequenceNumbers: Long | Long[], options?: OperationOptions): Promise<void>; | ||
close(): Promise<void>; | ||
createBatch(options?: CreateBatchOptions): Promise<ServiceBusMessageBatch>; | ||
entityPath: string; | ||
isClosed: boolean; | ||
open(options?: SenderOpenOptions): Promise<void>; | ||
scheduleMessage(scheduledEnqueueTimeUtc: Date, message: ServiceBusMessage, options?: OperationOptions): Promise<Long>; | ||
scheduleMessages(scheduledEnqueueTimeUtc: Date, messages: ServiceBusMessage[], options?: OperationOptions): Promise<Long[]>; | ||
send(message: ServiceBusMessage, options?: OperationOptions): Promise<void>; | ||
send(messages: ServiceBusMessage[], options?: OperationOptions): Promise<void>; | ||
send(messageBatch: ServiceBusMessageBatch, options?: OperationOptions): Promise<void>; | ||
Comment on lines
-258
to
-260
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Why not retain this send as sendMessages(message: ServiceBusMessage, options?: OperationOptions): Promise<void>;
sendMessages(messages: ServiceBusMessage[], options?: OperationOptions): Promise<void>;
sendMessages(messageBatch: ServiceBusMessageBatch, options?: OperationOptions): Promise<void>; and add the new ones as follows? receiveDeferredMessages(sequenceNumber: Long, options?: OperationOptions): Promise<ReceivedMessageT[]>;
receiveDeferredMessages(sequenceNumbers: Long[], options?: OperationOptions): Promise<ReceivedMessageT[]>; There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is up for debate and the final result should probably go to our guidelines :) Personally, I like the single method model because it reduces clutter in the editor suggestions. I'd rather see a single From a API reference docs perspective, it is one less method to document if we don't follow the overloads pattern. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also dislike overloads since we don't really have them. :) Is it really that useful to support both singular and array call patterns? Arrays are cheap in JS, so my default is to say only take an array and someone can box a singular value if they need to. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I like removing singular :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Event Hubs we just have a single There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What benefit do we get by doing this vs having the signature reflect union type? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xirzec - from discussions in the team, sending single messages (ie, dispatching commands) is a common enough pattern in ServiceBus that we want to support it without any extra work, small as it might be. This is in contract to EventHubs where we were (and are) pretty sure that sending large batches of messages to optimize throughput was more common. |
||
scheduleMessages(scheduledEnqueueTimeUtc: Date, messages: ServiceBusMessage | ServiceBusMessage[], options?: OperationOptions): Promise<Long[]>; | ||
sendMessages(messages: ServiceBusMessage | ServiceBusMessage[] | ServiceBusMessageBatch, options?: OperationOptions): Promise<void>; | ||
} | ||
|
||
// @public | ||
|
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.
[receiverreceivebatch] will need to change and I think that'll also require a change to the URLs to the docs as well.
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 left this as is because it would point to a broken link. Since we do a clean up of links when we get closer to release, we could do it then.