1
votes

I know that this probably not the right forum to ask this question as this is not about any particular code issue but does anyone have any idea regarding how we can send messages to and receive them from a particular Consumer Group in Azure Event Hub using .Net SDK or Rest API(I have already created a custom consumer group in the portal)? I am just starting off with Azure Event Hubs and didn't get much help about the same on the web. Thanks in advance.

2

2 Answers

1
votes

"Consumer Groups" is a receiver side concept as its name already suggests. Senders can send to an eventhub or to a specific partition of an eventhub however senders cannot target a particular consumer group. Basically, senders are consumer group agnostic entities.

Here you can find some code snippets on consuming events - https://docs.microsoft.com/en-us/azure/event-hubs/get-started-dotnet-standard-send-v2#receive-event

0
votes

You also may want to look through the samples area of the repository. Each of the listed samples is focused on one scenario and attempts to break down what is being done and why inline with the code.

For reading events, I'd suggest starting with the sample [Read events from an Event Hub], which discusses consumers groups and how they're related to the client.