Architecture Recommendation for Isolated Customer Streaming: Event Grid Topics vs Event Hub Consumer Groups

Anirudh Singh Bharti 20 Reputation points
2025-11-18T10:25:26.7+00:00

We need to ingest two data streams into IoT Hub: • A batch path • An instant/real-time path

The batch path data must be integrated with Microsoft Fabric. The instant/real-time path data needs to be distributed to individual customers, with each customer subscribing to their own dedicated stream.

We are evaluating Event Hubs and Event Grid as options for the publishing layer. Given that we may have between 10 and 100 customers and require connection-level isolation, which approach would be more suitable? • Creating a custom Event Grid topic for each customer, or • Using a consumer group per customer in Event Hubs?

Additionally, if Event Grid is chosen, we would appreciate recommendations on how best to structure domain topics (e.g., by business domain, by data type, or by customer segment). Please help us with pros and cons

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
0 comments No comments
{count} votes

Answer accepted by question author
  1. SRILAKSHMI C 11,040 Reputation points Microsoft External Staff Moderator
    2025-11-18T12:34:12.1066667+00:00

    Hi Anirudh Singh Bharti,

    Welcome to Microsoft Q&A.

    Thanks for sharing the details of your architecture scenario. Since you need to ingest data into IoT Hub and then fan it out to different downstream paths batch ingestion into Microsoft Fabric and real-time isolated streams for individual customers it’s critical to choose the right messaging service for scalability, isolation, and operational simplicity.

    Below is a consolidated comparison of both options, along with a recommendation based on your requirements.

    1. Event Hubs with One Consumer Group per Customer

    Event Hubs is optimized for high-throughput streaming, partitioned ingestion, and scenarios where many independent readers consume the same event stream. However, it does not provide true isolation at the tenant/customer level.

    Pros

    • Excellent for large-scale, real-time streaming
    • Supports many concurrent consumers via consumer groups
    • Simple to run a single pipeline for all events
    • Ideal for analytics, reprocessing, and Fabric ingestion

    Cons

    • No data isolation all customers receive the same stream unless you implement filtering
    • Customer-specific routing becomes your responsibility
    • Slow consumers can affect throughput
    • Hard limit of 100 consumer groups per Event Hub
    • Higher management overhead once customer count increases

    Conclusion

    Event Hubs works well for shared streams and analytics, but it is not ideal for strict customer-specific isolation.

    2. Event Grid with One Custom Topic per Customer

    Event Grid provides event-based push delivery with strong isolation boundaries. Each topic/subscription can act as a completely separate event channel, making it a strong choice when customer segregation is required.

    Pros

    • Built-in tenant-level isolation each customer gets their own topic/subscription
    • Customers never see events meant for others
    • Supports routing, filtering, and per-customer permissions
    • Lightweight, fast, and low-latency “push” delivery
    • Scales automatically based on event volume

    Cons

    • More topics to manage (but 10–100 is fully manageable)
    • Lower throughput than Event Hubs
    • No built-in event replay like Event Hubs

    Conclusion

    Event Grid aligns better with your requirement for connection-level isolation, secure multi-tenant distribution, and clean event separation.

    3. Recommendation Based on Your Requirements

    Given that you:

    Have 10–100 customers

    Need real-time distribution

    Require strict customer isolation

    Need to avoid cross-customer data exposure

    Event Grid with a dedicated custom topic per customer is the recommended approach.

    This provides:

    Strong tenant isolation

    Per-customer security boundaries

    No customer-side filtering

    Clear, simple, and maintainable routing

    Event Hubs is better suited for your batch path and Fabric ingestion, not customer-isolated fan-out.

    4. How to Structure Event Grid Topics

    If you choose Event Grid, there are two scalable ways to organize topics:

    A. Topic-Per-Customer (Best Isolation – Recommended)

    company.events.customerA  
    company.events.customerB  
    company.events.customerC  
    

    Pros: Maximum isolation, simple access control Cons: More topics to manage

    B. Domain Topics + Customer Subscriptions with Filters

    company.events.deviceTelemetry  
    company.events.alerts  
    company.events.maintenance  
    

    Customers receive only filtered events through subscription rules.

    This approach is easier to manage but provides weaker isolation compared to topic-per-customer.

    5. Putting the Architecture Together

    A balanced hybrid architecture could look like this:

    IoT Hub → Event Hub → Microsoft Fabric (batch ingestion, analytics, replay)

    IoT Hub → Event Grid → Customer-specific real-time streams (isolated topics)

    This allows you to use Event Hubs where replay and throughput matter, and Event Grid where security and isolation matter.

    Please refer this

    I Hope this helps. Do let me know if you have any further queries.

    If this answers your query, could you please take a moment to retake the survey by accepting this response? Your feedback is greatly appreciated.

    Thank you!


1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2025-11-18T10:26:07.7933333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    For your scenario of ingesting two data streams into IoT Hub, where you require connection-level isolation for 10 to 100 customers, both Event Hubs and Event Grid have their pros and cons.

    Event Hubs with Consumer Groups

    Pros:

    • Isolation: Using consumer groups allows each customer to have their own dedicated stream while sharing the same Event Hub. This provides a level of isolation as each consumer group can independently read from the stream without affecting others.
    • Scalability: Event Hubs can handle millions of events per second, making it suitable for high-throughput scenarios, especially for the instant/real-time path.
    • Flexibility: You can easily add or remove consumer groups as customer needs change.

    Cons:

    • Management Complexity: Managing multiple consumer groups can become complex, especially if you have many customers, as you need to ensure that each group is configured correctly.

    Event Grid with Custom Topics

    Pros:

    • Simplicity in Subscription Management: Each customer can have their own Event Grid topic, making it straightforward to manage subscriptions and event routing.
    • Event Routing: Event Grid is designed for event-driven architectures and can efficiently route events to various endpoints, including Azure Functions or Logic Apps.
    • Integration with Azure Services: Event Grid integrates well with other Azure services, making it easier to build event-driven workflows.

    Cons:

    • Potential Overhead: Creating a custom Event Grid topic for each customer may introduce overhead in terms of management and could lead to a higher number of topics to monitor.
    • Cost Considerations: Depending on the volume of events and the number of topics, costs could increase with Event Grid compared to a single Event Hub.

    Recommendations for Structuring Domain Topics in Event Grid

    If you decide to use Event Grid, consider structuring your domain topics based on:

    • Business Domain: This allows you to group events by the specific business area they relate to, which can simplify management and consumption.
    • Data Type: If the data streams vary significantly in type, categorizing by data type can help consumers subscribe to only the relevant events.
    • Customer Segment: For targeted communication, you might also consider segmenting by customer type or size, allowing for tailored event handling.

    In conclusion, if you prioritize connection-level isolation and scalability for real-time data, Event Hubs with consumer groups may be more suitable. However, if ease of management and integration with Azure services is more critical, Event Grid with custom topics could be the better choice.


    References:


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.