Azure Event Hubs listener without Authentication - webhooks

I'm wanting to register an Azure Event Hubs as a WebHook to a third-party application which does not support any header/body authentication, just a simple URL.
I can't see anywhere in the Azure Event Hubs documentation or portal that allows me to set up a listener without a SAS? I understand this would make the Event Hub insecure, however, since it's only listening and writing the payload to Azure Blob Storage, I am happy to accept the risk.
If it's not possible to set up an Azure Event Hubs without any authentication, I thought about setting up an Azure Automation Runbook to expose a Webhook. The runbook would pass the payload to the Azure Event Hubs handling the authentication on the way through. Is this acceptable practice?
Are there any other known workarounds?

No, you must listen the event hubs with some authentications.
Your solution is feasible. You can use runbook to receive data and interact and verify with event hub. Of course, as the comments said, functions and other services are also feasible methods.
In short, it is impossible without any authentication at all.

Related

Using Azure service bus to send message to Salesforce

I am working on a POC where I have a publisher which is publishing message to Azure Service Bus using Topics. Multiple subscribers have subscribed to the topic.
One of the subscriber wants to send message to Salesforce. What is the best way to send message to Salesforce
I have following options in mind:
Use Azure function to listen to Service bus and then connect with Salesforce to send data. Not sure if a connector already exists.
Read data from Service bus using a .net client and then send message to Azure Logic Apps. From Logic app use Salesforce connector to send message to Salesforce. Not sure if Logic apps can directly subscribe to Service bus.
What are pros can cons of both the options ?
Both approaches are valid but the one to chose depends on the level of comfort you have with the aforementioned technologies.
Integration with Salesforce is done via REST API. The LogicApps connector simplifies it quite a bit. Except, I would not read data from Service Bus message using a .NET client and then send message to Azure Logic Apps, but rather trigger Logic Apps with an incoming message using Service Bus connector and invoke Salesforce connector. This way there will be less moving parts.
In case you’re comfortable with Salesforce REST API, Function is a valid approach as well.

Why Azure event hub subscriber not working?

I am implementing an azure event hub subscriber which is successfully able to connect but it's not receiving the message for a particular event hub in an event hub namespace. But it's working as expected for the other event hub in the same namespace. there is no error in the logs. Is there any way to find out the root cause of the issue?
I am successfully able to publish the message with the same configuration.
Publisher and Subscriber are running on the same machine.
I have implemented the publisher and subscriber in Dapr.
Both publisher and subscriber logs are exactly the same in Dapr, So I think it's an issue with the storage account.
Adding more information:
I have tried my application with a different storage account and it's working as expected. So what is the issue? How can I resolve it? I want to work with my old storage account.
All issues
There are multiple problems put together in your question, which can be tested separately. (E.g. event hubs, dapr, storage account ...etc.) It is critical to have a granular understanding of these problems, so I would try to test them one-by-one.
Event Hub issues
You can test your Event Hub flow separately by creating simple "hello world" clients locally and reproducing a relationship between them based on your production scenario.
E.g.
try to connect to an event hub with exactly one publisher and exactly one consumer,
try to publish the same message with one publisher to multiple event hubs and see if you can consume them with separate consumers,
...etc.
Based on your comment, I will list 2 example problem scenarios:
Problem 1: "I can access one Event Hub in the namespace, but can't access another in the same namespace."
You can configure "Shared Access Policies" for the scope of the Event Hub Namespace, which will be applied to all event hubs in that namespace.
You can also configure the same policies for the scope of the Event Hub, which will be applied to that single hub only.
Make sure to use the appropriate scope in Azure portal while trying to use the connection strings from your code.
Problem 2: "I can publish messages from a client to an Event Hub, but cannot consume messages with the same client, from the same machine, with the same connection string."
You can configure an infinite number of "Shared Access Policies", each having a custom key and connection string.
You can also configure client access privileges for each policy, chosen from the following 3 options:
Manage
Send
Listen
Make sure to use the appropriate client access privileges. If you want to use the same exact connection string for sending and listening, add both "Send" and "Listen" access to that policy. (You can also have a different policy and connection string for sending and listening...etc.)

How to check the event received in Azure Event Hub

Perhaps a rather simple question, yet I couldn't find the answers after doing some searching.
After I have send an event to an Azure event Hub (via the Java code), how could I check back in the Azure Portal about the event that I have sent ?
(so that I could inspect the header and body of the event content for verification).
In the Azure Portal, after I have clicked in the event hub, there is a metric to show the incoming requests, but this only shows the counts, but I would want to inspect the individual event recevied.
You can inspect the data on the portal with Azure Stream Analytics test consumer which can be loaded on the entity blade.
To my knowledge, it's not currently possible to inspect Event Hubs events via the portal. To do you, you'd either need to read the events using one of the SDKs or a product like Service Bus Explorer to inspect them.
I believe the answer to your question is Azure Monitor. Check out this link and see if it helps.

Integration/synchronization pattern

We are designing synchronization between SAP and Salesforce.
Our architect propose pattern to use Azure Service Bus between them:
Our client want to use Azure Event Hub instead Azure Service Bus for this.
And client told us, that Event Hub is must have for that.
Reading documentation in my opinion Azure Service Bus should better fit for synchronization like Point-to-Point (from SAP database to Salesforce database).
Can somebody explain, why Event Hub can be better for synchronization like this?
What is good point for our client to use it?
Should we try to convince our client to change architecture to Service Bus?
I really didn't made integration using Event Hub so I don't know what should I expect for that.

Can we subscribe an email ID or Cell number as subscriber to Azure event hubs/notification hubs?

In my python application, if any bad/good event happens, I want to send the event details as notification message to user's email addresses or phone #s that have been subscribed to this application. So I am looking for publisher-subscriber model azure cloud
Looks like multiple Azure services achieving similar goal but having a thin line of differences. Event hubs and notification hubs seems promising. So my question is as follows:
Can email ID/phone # be subscribed to Azure event hub and receive the message being sent/produced to Azure event hub?
If not event hub, what is the correct option? Can I achieve it with Service bus or Notification hub?
In AWS, there is a service called SNS (Simple Notification Service) where one can subscribe email/phone number and opt for receiving event messages about that application. I am looking for equivalent to that in Azure.
You can use the Azure Logic Apps / Azure Functions with Event Hubs to achieve this easily.
Using logic apps you can do like simple as below image.
Logic Apps has many in-build connectors for most all Azure Services, you can use Event-hubs,Service bus,SQL etc.,
You can find all the list of available connectors here
Update 1
Once you connected the Event-Hubs to send an Email connector, you will automatically get all the available source data from event-hubs to email task. See below
You can achieve this by using Azure Application Insights. With this, you will be able to monitor your application and receive alerts during application unavailabillity, failures or even during performance issue.
Check this https://learn.microsoft.com/en-us/azure/application-insights/app-insights-tutorial-alert

Resources