Hi @Pavel Livshits Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question.
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.
Instead of using the $Default consumer group to process Events routed to the Event Hub, create two unique consumer groups, one for each end point. Provide the created consumer group name in the function consumerGroup attribute. You can create the consumer group through your Azure Portal under the Built-in endpoints of your IoT Hub. Please refer the below image
I have also noticed that you are using a "cardinality" attribute in your EventHubTrigger function. I could not find a reference of this attribute in the official documentation of Event Hub Trigger I appreciate it if you can provide a reference of the resource where you have obtained this attribute from.
Please let us know if information shared is useful. Reach out to us if you still face issues and we would be glad to assist you.
- Kindly mark the answer as useful if the response is helpful so that it would benefit other community members facing the same issue.
- Original posters help the community find answers faster by identifying the correct answer. Here is how
- I highly appreciate your contribution to the community.