Skip to content

Sender updates#11580

Merged
JoshLove-msft merged 4 commits intoAzure:masterfrom
JoshLove-msft:sender-updates
Apr 27, 2020
Merged

Sender updates#11580
JoshLove-msft merged 4 commits intoAzure:masterfrom
JoshLove-msft:sender-updates

Conversation

@JoshLove-msft
Copy link
Copy Markdown
Member

@JoshLove-msft JoshLove-msft commented Apr 24, 2020

  • Add ServiceBusSenderOptions
  • Rename SendBatchAsync -> SendAsync

@JoshLove-msft
Copy link
Copy Markdown
Member Author

/azp run net - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment on lines 194 to 195
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't call ValidateEntityName method for queueOrTopicName and ViaQueueOrTopicName both. Think about if user passes EntityPath with connection string, then one of the above method will fail because we check in ValidateEntityName method that if the entity path specified in both(Connection.EntityPath and entityName) with different value then it will throw an exception.

if (!string.IsNullOrEmpty(Connection.EntityPath) && !string.Equals(entityName, Connection.EntityPath, StringComparison.InvariantCultureIgnoreCase))
{
      throw new ArgumentException(Resources.OnlyOneEntityNameMayBeSpecified);
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if they pass an entity name in the connection string that means they won't be able to use SendVia, since they are restricted to that one entity. So in this case we would want to throw an exception.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget to update this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

Comment on lines 12 to 16
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this Messages can be added to the batch using the <see cref="TryAdd"/> method on the batch for CreateBatchAsync docs as well?

Comment on lines 87 to 88
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ServiceBusClientOptions -> ServiceBusSenderOptions and ServiceBusClient -> ServiceBusSender

Copy link
Copy Markdown
Member

@ShivangiReja ShivangiReja Apr 24, 2020

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?

@JoshLove-msft JoshLove-msft merged commit 7cbe9dc into Azure:master Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants