-
Notifications
You must be signed in to change notification settings - Fork 26
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
Updated to Azure.messaging.EventHubs #5
Conversation
@jsquire - Can you please review? |
EventHubSampleData/EventHubSampleSendData/SendSampleData.csproj
Outdated
Show resolved
Hide resolved
EventHubSampleData/EventHubSampleSendData/SendSampleData.csproj
Outdated
Show resolved
Hide resolved
EventHubSampleData/EventHubSampleSendData/SendSampleData.csproj
Outdated
Show resolved
Hide resolved
EventHubSampleData/EventHubSampleSendData/SendSampleData.csproj
Outdated
Show resolved
Hide resolved
await using (var producerClient = new EventHubProducerClient(connectionString, eventHubName)) | ||
{ | ||
int counter = 0; | ||
for (int i = 0; i < 100; i++) |
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.
nit: I'd advise not using a single-letter variable name. What purpose does the loop index serve here and how does that differ from counter
? It may be better to use a while
loop and key off of counter.
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.
Here "i" stands for how many messages were sent. "counters" was used to count the numbers in each message.
In this sample, it means 100 meassages and 3 records in each message.
This kinds of how to send message to EventHub is same with how mono sample does. So i am prefer keeping this for loop.
Do you agree with this?
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.
Thank you for the context. I'd agree that keeping the structure makes sense. Can we rename to amountSent
or sendCount
to try and represent the semantics of it?
await using (var producerClient = new EventHubProducerClient(connectionString, eventHubName)) | ||
{ | ||
int counter = 0; | ||
for (int i = 0; i < 100; i++) |
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.
Thank you for the context. I'd agree that keeping the structure makes sense. Can we rename to amountSent
or sendCount
to try and represent the semantics of it?
Updated target: