3
votes

I am working in azure event hub. I have some doubts.

  1. What is Partition Id in Azure event hub receiver? Is this Id is same as partition Key in Azure event hub Publisher?

  2. What is Offset? ,What the use of it in azure event hub consumer?

  3. Can I consume the message with out using consumer group?

  4. Can I consume the message with single receiver?

  5. What is the use of blob in event hub consumer? I want only view the message what ever I sent.

1

1 Answers

4
votes

This article Event Hubs Overview should answer your questions in detail, but to summarize:

  1. When you create a new Event Hub in the portal, you specify how many partitions you need. The Publisher hashes the partition key of an event to determine which partition to send the event to. An event hub receiver receives events from those partitions.

  2. An event hub consumer tracks which events it has received by by using an offset into each partition. By changing the offset you can, for example, re-read events from a partition.

  3. You must have at least one consumer group (there is a default one). Each consumer group has it's own view of the partitions (different offset values) that let it read the events from the partitions independently of the other consumer groups.

  4. Typically, you have one receiver per partition to enable scale out. An event hub has between 8 and 16 partitions.

  5. Offset values are managed by the client. You can checkpoint your latest position in each partition to enable you to restart at the latest event if the client restarts. The checkpoint mechanism writes the latest offset values to blob storage.