Subscribe to External Azure Web PubSub Service from Azure - azure

I have an external vendor who would like me to subscribe to their Azure Web PubSub service from which I will receive notifications when a certain event occurs. What is the best way to subscribe to these events from my own Azure environment? I am familiar with handling HTTP requests from Azure Functions and Azure Logic Apps, but this is my first time using Websockets within Azure (and I am new to Azure itself).
Edit: Also, I have read the documentation on Azure Web PubSub and have followed along with some of the tutorials. Most either show how to subscribe from a C# console application or a web app, but what if I want to kick off a workflow in Azure when the notification is received?

subscribe to their Azure Web PubSub service from which I will receive notifications when a certain event occurs
Looks like you will be acting as the event handler upstream role. You can have an app server running and listen to the CloudEvents HTTP request from Azure Web PubSub service. https://learn.microsoft.com/en-us/azure/azure-web-pubsub/reference-cloud-events
Here is a sample about handling events: https://learn.microsoft.com/en-us/azure/azure-web-pubsub/tutorial-build-chat?tabs=csharp#handle-events

Related

Azure Event Grid Webhook validation handshake

I would like to know if it is possible to have Azure Web Site (ASP.NET Core) and Azure Event Grid with Webhook to the Azure Web Site in the same ARM Template?
For the first time, there is no possibility to validate Webhook.
Of course, I can split it into the two ARM Templates and deploy 1st ARM with the Application, deploy the Application and add the Event Grid Webhook.
Is it some other workaround here? I can use Event Grid Schema or Cloud Events Schema.
another workaround can be used to create an event subscription with some destination resource handler (for instance: storage queue) and then updating for your webhook handler.

Azure DevOps Custom ServiceHook

I am looking for a way to send a custom HTTP POST on service hook action. Kind of like the default WebHook functionality but with a customised body.
Is there a way to link a custom action to the consumer event?
You can add some proxy like azure function that will reformat your message and if need call Azure DevOps rest api and also get more information, and after reformatting message you send it to final consumer. You can use logic app also for that.
You can use azure logic app as suggested by #Janusz Nowak to send a custom http post on the event in azure devops.
You can check out Quickstart: Create your first workflow by using Azure Logic Apps - Azure portal.
After the logic app is created in your azure portal. In the Logic app designer page choose the Blank Logic App in templates.
In the search box type in azure devops and select a trigger event in azure devops.
Then you will be prompted to authorize the logic app to connect to your azure devops.
When you complete configuring your organization and project in the event trigger. Click ** + New Step** to add a HTTP action
You can customize your Http Request in the Http action.

Azure Event Grid not sending events to webhook

I have an Azure media services account for which I want to be notified via webhook when encoding jobs are finished. I'm using v3 of the Media Service API.
I've added an event subscription to this account and have sucessfully validated the webhook endpoint.
Here's where the problem comes in. If I do something that should trigger an event(start an encoding job, create an asset, etc.) on the Azure Portal nothing happens event wise. Looking at the event subscription on the Portal shows no events detected as well.
Is this an Azure bug or am I missing something?
As it turns out, actions done through the Portal or v2 of the API does not trigger Events from Event Grid.
I used Azure Media Services Explorer to test out my webhooks instead.

Integrating Azure platform with other cloud providers

I am trying to integrate my azure solution with different cloud providers. I need to pull data from different cloud providers. They will expose the data via Rest services. I need to pull the data and publish it to my Azure platform. I am thinking of using the Azure Service Bus to pull the data and publish to an Azure Event Hub. Do you think this is better approach or any other good way to connect to a different cloud from Azure.
If the cloud providers you're trying to integrate with made data available via a RESTful API, I don't think Service Bus is going to help you. To make use of Service Bus, the third party cloud providers would need to enqueue data to a Service Bus Queue or Topic.
If you're trying to consume data periodically from RESTful APIs, how about using an Azure WebJob that calls those third party RESTful APIs on an interval, then processes the data?

How to send a message to Azure service bus queue from a Azure mobile services script

I am trying to make a hybrid application on Azure which uses both mobile services and a worker role. In a script (Node.js) which runs on mobile services DB, I want to send a message through service bus queue. Then my worker role will receive that message and perform some actions. But I can't find how I should sent the message to service bus queue.
BTW, this is not mentioned in "Mobile Services server script reference". Is it possible at all or not?
Thanks.
This is possible. From your Mobile Services scripts, you can use the Azure module to talk to Service Bus. You can find the reference and source code for the Azure module here: https://github.com/WindowsAzure/azure-sdk-for-node. For an example of using the Azure module (in this case to talk to Blob Storage, but it's useful code to go off of) take a look at this walkthrough: https://www.windowsazure.com/en-us/develop/mobile/tutorials/upload-images-to-storage-dotnet/.

Resources