New event Hub vs New Consummer Group

Joe White 116 Reputation points
2021-09-08T01:31:44.23+00:00

Unlike message bus, the hub does not have topics

If I already have a hub and need to pass a different kind of event\message, Should I create new Hub instance under the Hub namespace or should I create a new consumergroup?

let's say I have hub "A" passing a json message "X" from source to destination and now I need a new stream with a different message"Y" with different source and different destination. Should i create a new hub to better isolate the new stream?

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
560 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 77,901 Reputation points Microsoft Employee
    2021-09-09T04:02:41.317+00:00

    Hello @Joe White ,

    Thanks for the question and using MS Q&A platform.

    Unlike message bus, the hub does not have topics?

    Yes, Azure Event Hubs does not have topics.

    Should I create new Hub instance under the Hub namespace or should I create a new consumergroup?

    In a stream processing architecture, each downstream application equates to a consumer group. If you want to write event data to long-term storage, then that storage writer application is a consumer group. Complex event processing can then be performed by another, separate consumer group. You can only access partitions through a consumer group. There's always a default consumer group in an event hub, and you can create up to the maximum number of consumer groups for the corresponding pricing tier.

    The publish/subscribe mechanism of Event Hubs is enabled through consumer groups.

    A consumer group is a view (state, position, or offset) of an entire event hub. Consumer groups enable multiple consuming applications to each have a separate view of the event stream, and to read the stream independently at their own pace and with their own offsets.

    The following figure shows the Event Hubs stream processing architecture:

    130535-image.png

    An Event Hub consumer is associated with a specific Event Hub and consumer group. Conceptually, the consumer group is a label that identifies one or more event consumers as a set. Often, consumer groups are named after the responsibility of the consumer in an application, such as "Telemetry" or "OrderProcessing". When an Event Hub is created, a default consumer group is created for it, named "$Default." These examples will make use of the default consumer group for illustration.

    Each consumer has a unique view of the events in a partition that it reads from, which means that events are available to all consumers and are not removed from the partition when read. This allows consumers to read and process events from the Event Hub at different speeds without interfering with one another.

    For more details, refer to Features and terminology in Azure Event Hubs.

    Hope this will help. Please let us know if any further queries. Thank you.


    • Please don't forget to click on <code>Accept Answer</code> button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    0 comments No comments

0 additional answers

Sort by: Most helpful