Dapr subscriber not working for Azure EventHub in C# - azure-eventhub

I am implementing subscriber in C# for Azure event hub, But it's not working.
There is no error in the logs, What could be the possible reasons for failure?
My code could be found here.

I have found the issues, I was using the event hub namespace key, But I had to use the key and connection string from the Shared Access Policies from the Event Hub.
There was one more issue, in command dapr run --app-id <consumer group name>, app-id should be the consumer group name of the event hub.

Related

Consuming azure event hub events in AWS

I'm trying to consume events that are published to a Azure event hub hosted by a third party, the service that consumes these events is an AWS based architecture.
What is the best way to consume event hub messages in aws services?
Would my only options be:
Set up an EC2 with an application that continuously processes the event hub messages
Have a scheduled lambda that processes messages, picking up where the last invocation left off
Both options using this guide:
https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-node-get-started-send
Is there any other way to accomplish this? The goal would be to somehow have event hub trigger a service like lambda directly.

Is there any way to send data from AWS Kinesis to Azure Event Hubs?

My company is doing a POC on some streaming data and one of the tasks is sending data from AWS Kinesis to Azure Event Hubs.
Has anyone tryed to do something like this before?
I was thinking of a lambda function listening to kinesis firehose and sending the data to event hubs but I have no experience on Azure at all and I don't even know if this is possible.
Yes, this is very much possible.
Inter-Cloud environment where data can be streamed among two services can be achieved using AWS Kinesis and Azure Event Hub.
You can stream data from Amazon Kinesis directly to Azure Event Hub in Real-Time. Using ‘serverless’ model and cloud computing to process and transfer events without having the need to manage any native application written on an on-premise server.
You will be required connection string, SharedAccessKeyName, and SharedAccessKey from the Azure Event Hub. This will be needed to send data to Event Hub. Also, make sure the Event hub can receive data from the IP address you are running the program from.
Refer this third-party tutorial to accomplish the same

AWS IoT scaling issues and metrics for monitoring IoT

I am using AWS IoT Service.
When a device sends a registration message to MQTT broker, I have a rule to store it in a SQS queue.
A Lambda function is triggered, when the message is added to the Queue. The Thing is created for the device and it's certificate is registered.
While carrying out the load testing, I observed that, after some time, the incoming messages are not received on the AWS MQTT broker and are not processed.
I have written some test clients which run on EC2 instances to simulate the MQTT clients.
If I restart the test clients after some time, again I can see the messages coming to AWS IoT.
I am not sure, if this is the issue of MQTT broker or if it is the issue with the clients running on EC2 instances.
I can think of possible issues because of limits on AWS IoT ,
https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_iot
I want to know what are the possible AWS IoT matrices, I need to monitor for this or which IoT specific alarms I need to configure?
Is it a possible issue on EC2 side? ( maybe network out bytes per second, etc.)
There is another load testing scenario, in which I am not doing registration of devices, but just capturing the connect or disconnect events. In this case, I am not observing similar issues.
As you know, there is some limits about AWS IoT.
API Transactions per Second
CreateCertificateFromCsr 15
CreateDynamicThingGroup 5
CreateJob 10
CreatePolicy 10
CreatePolicyVersion 10
CreateRoleAlias 10
CreateThing 15
Generally, AWS API throws Exception when it run over limts.
How about catch Exception?
If you want to check EC2 network issue, use some command ( netstat, tcpdump, ... )

Pointing to Azure Event Hub instead of AWS Kinesis

My company currently uses Azure for our Data Warehousing infrastructure. In the past we have used Azure Event Hubs for streaming data. When working on previous projects this hasn't been an issue we just provide the connection details and they start sending us data.
However we have recently started working on a new project where most of their infrastructure is hosted on AWS, we have been asked to set up a Amazon Kinesis endpoint instead as they do not support Azure Event Hubs.
I don't know much about sending the data, but is it asking a lot to send to an Event Hub instead of Kinesis?
My suggestion for this is you could introduce a middle layer which understands both Kinesis and Event hub. And the middle layer I know is Spring Cloud Stream. It provides binder abstraction to supports various message middleware such as Kafka, Kinesis and Event hub.

Mixing of messages between topics in Azure Event Hubs

I am facing a different issue which is surprised to see. I have created one Event Hub namespace and within that there are 2 (a&b) event hubs with different policies. When I publish some messages to event hub "a" and I am able to subscribe the events from "b" as well. Is it something I missed in configuration? Please help.