Dapr integration with Azure Event Hub with CloudEvent
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 378
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 6
Description
Hi Team,
I'm trying to demo a data ingestion system using Dapr Pub/Sub component integrated with Azure Event Hub. So then I can use Event Hub Stream Analytics Job to forward the message to Comosdb.
1. Dapr "orderproducer" generates fake order and push to Azure Event Hub.
2. Event Hub forward the message to Cosmosdb.
Dapr is not generating the CloudEvent payload with the correct id (event id). It always comes with "orderproducer" (app-name). I tried to customise following this: https://docs.dapr.io/developing-applications/building-blocks/pubsub/pubsub-cloudevents/, but no success.
Dapr Componet configuration:

Dotnet code using BulkPublishEventAsync into Event Hub. I've tried PublishEventAsync, but I got the same problem.

What I got in cosmosdb:

I tried this as well:

I was expecting the following content values:
* "id" with a unique identifier
* "source" with the value "OrderProducer"
* "type" with the value "OrderCreatedOrUpdatedEventV1"
Thanks,
Gio
Contributor guide
Research direction
Start with the linked CloudEvents documentation, then inspect the shown Dapr component configuration and the .NET calls using BulkPublishEventAsync and PublishEventAsync. Compare their emitted payload with the Cosmos DB example and determine whether the integration can produce the expected unique id, OrderProducer source, and event type; done means the resulting CloudEvent fields match those expectations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100