In this video I wanted to explore using Azure Connector Namespaces together with Logic Apps Automate to process messages from Azure Service Bus. Instead of putting a polling Service Bus trigger inside the workflow, the Connector Namespace listens to the queue and pushes each message to an HTTP-triggered workflow. It’s a small change, but it gives you some nice benefits around testing and operations, along with a couple of gotchas worth knowing about.
What is Azure Connector Namespace?
Connector Namespace is a managed Azure service that hosts prebuilt connectors (Service Bus, SharePoint, Salesforce, SAP and so on) outside of a workflow engine. The namespace looks after the connections and credentials, polls source systems, delivers events through triggers, and applies retry and throttling policies, so your app just receives the events. If you’re new to it, have a look at the Microsoft Learn overview or my earlier post on using Connector Namespace to expose a SQL table via an API.
The scenario
The use case is a typical event-driven integration: something changes, a message lands on a queue, and we want to enrich it and let an AI agent do some processing. End to end it looks like this:
- A message containing a person ID is sent to an Azure Service Bus queue.
- A Connector Namespace trigger picks up the message and calls the workflow’s HTTP endpoint.
- A Logic Apps Automate workflow receives the event and responds straight away.
- The workflow looks up the person in CRM through Azure API Management.
- An AI agent (Azure AI Foundry) evaluates the data, and the workflow writes a note back to CRM.
Why put Connector Namespace in the middle?
In the past you’d have dropped a polling Service Bus trigger straight into the workflow. What I like about this approach is that it decouples the listening trigger from the workflow execution:
- Easier testing. The workflow is just an HTTP endpoint, so you can test it in isolation without needing messages on a queue.
- Operational control. You can switch a trigger off in the Connector Namespace, for example during a maintenance window, and messages stay on the queue without you touching the workflow.
- Centralised connectivity. The Service Bus connection, credentials and polling live in one place rather than being spread across workflows.
Building the Logic Apps Automate workflow
The workflow uses the Request trigger and a Response action, so even though this is a Service Bus scenario it’s really an HTTP-based interaction. A few things are worth calling out:
- Add a JSON schema to the Request trigger. The payload from Connector Namespace has a body containing a
contentDataproperty, which holds the message content as a Base64-encoded string. - Respond early. The Response action sits near the start of the workflow. The agent step can take 30 seconds to a minute, and if the namespace waits for the whole workflow to finish you risk the message lock expiring or the namespace retrying because it thinks the call failed.
- Decode, then parse. A Compose action decodes
contentDatawithbase64ToString(), and Parse JSON pulls out the person ID. From there you’re back in the normal Logic Apps world.
Setting up the Connector Namespace trigger
Over in the Connector Namespace, setup is fairly light:
- Create a connection to Service Bus. Managed identity or a user-assigned identity is the best choice for authentication.
- Create a trigger, such as When a message is received in a queue. The options will feel familiar if you’ve used the Logic Apps Service Bus connector. Pick your connection, polling interval and queue.
- Choose an HTTP destination: paste in the workflow’s URL, then set the HTTP method and authentication type.
- Give the trigger a meaningful name and description. With an HTTP destination you can’t see which workflow it calls, so I’d use something like queue name → logic app name. Future you will be grateful in three months’ time.
When I tested it by sending a message from Service Bus Explorer, the trigger run history in the namespace showed the event firing and the HTTP call completing. The response headers include the workflow name, which is handy for confirming where the message went. The run history in Logic Apps Automate then showed the decoded message, the agent run and the CRM update.
Things to watch out for
- Long-running work before the response. Keep the steps before the Response action light, or you’ll see lock expiries and retries.
- Load. Under heavy load, workflows may not start and respond quickly enough, which can also cause retries.
- Cold starts. If the automation hasn’t run for a while, the first call may be slow, so make sure your retry behaviour copes with it.
- Discoverability. Because the destination is just a URL, good naming really matters. It’s the same problem I wrote about in working out which Logic App uses which Service Bus queue.
My feedback for the product team
- Make it clearer which Service Bus namespace a connection points to, ideally with a link to it.
- Let me pick a Logic Apps workflow as the trigger destination directly, instead of copying and pasting the URL.
Wrapping up
Overall this is a simple pattern to get running, and combining Connector Namespace, Logic Apps Automate and Service Bus gives you a clean separation between listening and processing. For moderate workloads where you want easier testing and the ability to pause triggers, it’s well worth a look. If you’ve been bitten by a Logic App that stopped processing messages, having the trigger managed separately could make troubleshooting a lot easier.
Are you trying Connector Namespace or Logic Apps Automate yet? Let me know in the comments, and if you found this useful, subscribe on YouTube for more Azure integration content.
