Connecting to Azure Functions Using REST
In the 9.8.0 release of the PubSub+ event broker, the Click-to-Connect Wizard in the PubSub+ Broker Manager can create REST connectors to cloud services like Azure Event Hubs, Azure Service Bus, and Azure Functions.
You can trigger Azure Functions on events from a PubSub+ event broker, leveraging its REST Delivery Points (RDP)s to event enable your serverless architecture as part of your event-driven architecture (EDA) journey.
Goals
The goal of this tutorial is to demonstrate how to set up an Azure Functions REST connector in a PubSub+ event broker to send messages to an Azure function from a remote connection. This tutorial will show you how to:
- Configure the event broker to set up RDPs with a REST connector
- Send messages to the Azure function using the Try Me! functionality built into the PubSub+ Broker Manager
- Review messages in the Azure Functions logs
Prerequisites
- Solace PubSub+ Event Broker 9.8.0 or higher
- Access to PubSub+ Broker Manager (refer to PubSub+ Broker Manager)
- An Azure function that responds to the messages being sent from the connector
Connecting to Azure Functions
In the 9.8.0 release of the PubSub+ event broker, the new REST Connector wizard can help you set up and configure integrations to various cloud platforms and their services.
This example shows how to integrate the PubSub+ event broker with Azure Functions.
-
Log into the PubSub+ Broker Manager.
-
Launch the connector Click-to-Connect Wizard (refer to Creating a REST Connector with Click-to-Connect).
-
Click Microsoft Azure.
-
Click Azure Functions then click Authenticate.
-
Provide a name for this connector and fill in the Azure Function URL.
You can get the Azure Function URL from the Azure console in the Overview section.
-
Click Connector Setup and review the settings (they are auto-populated based on the Azure Function URL that was provided in previous step).
-
Click Subscription Setup and set up the subscription for the messages.
-
Click Create and Enable Connector to finalize the connector creation.
-
Use the PubSub+ Broker Manager Try Me! application to send a message.
-
View the message in the Azure Functions logs.