- FILTERED
- ROUTED
- LOGGED
- MANUAL
Short answer
How can my AI route messages using custom metadata?
Your agent uses the publish_message tool to include specific key-value pairs in the message payload. These properties trigger Azure Service Bus subscription filters to move the message to the right destination. You'll see how this works in the breakdown below.
Routing outcomes
Where your messages land.
The AI uses metadata to ensure every payload reaches its intended target.
FILTERED
Correct subscription
The AI attaches metadata that matches your subscription filters. The message lands exactly where it belongs based on those properties.
ROUTED
Automated paths
Instead of sending everything to one place, your agent tags messages so Azure handles the distribution.
LOGGED
Traceable payloads
Because the AI includes custom properties, you can track why a message was routed to a specific handler.
MANUAL
Human review
If the AI generates metadata that doesn't match any existing filters, the message won't route. You'll need to check your subscription rules.
The workflow
What your AI does when a message needs sending.
The AI handles the payload construction and property assignment in one go.
Analyze routing needs
Your agent looks at the message content and determines which custom properties are required for your Service Bus filters.
publish_messageConstruct the payload
The AI builds the message body and maps the necessary metadata keys to their specific values.
publish_messageExecute the send
The agent calls the tool to push the message into the topic with the attached properties.
publish_messageConfirm delivery
The AI verifies the operation was successful so you know the message is in the system.
publish_message
Try it
Copy these to start.
Use these prompts to begin routing messages immediately.
Starting points
These are opening lines. Swap out the topic names and property keys to match your Azure setup.
Azure Service Bus Topic Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_GM5MOjdM1wYoxb9yf6yuga4ArrveKqVAH1ZyGJsL/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — Azure Service Bus Topic capabilities are ready to use.
{
"mcpServers": {
"azure-service-bus-topic-mcp": {
"url": "https://edge.vinkius.com/vk_preview_GM5MOjdM1wYoxb9yf6yuga4ArrveKqVAH1ZyGJsL/mcp"
}
}
}Publish a message to the 'orders-topic' with a custom property 'region' set to 'north-america'.
Send a message to the 'telemetry' topic and include a metadata property for 'device_id'.
Route a high-priority alert to the 'system-events' topic using a 'priority' metadata tag.
Create a message for the 'user-logs' topic with custom metadata for 'user_type'.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect Azure Service Bus Topic once, then ask.
Just link your account once. Your credentials stay encrypted, and you can start sending routed messages through any MCP-compatible client.
Connect Azure Service Bus Topic to your AIFAQ
How this task behaves.
- 01
Can the AI create new Service Bus subscriptions?
No. The AI can only publish messages to existing topics using the available tools.
- 02
Will the AI change my existing routing rules?
No. The AI only interacts with the data being sent. It cannot modify the subscription filters or rules in Azure.
- 03
How does the AI know which metadata keys to use?
You tell the AI which keys and values to include in your prompt, or it can infer them from your instructions.
- 04
Can the AI delete messages from the topic?
No. This MCP is designed for publishing messages, not managing or deleting them from the queue.
- 05
Does the AI handle the connection to Azure?
Yes. Once you connect the MCP, your agent uses the established connection to send the payloads.
More questions about Azure Service Bus Topic? The Connector page answers them. See everything the Azure Service Bus Topic Connector can do
Connect Azure Service Bus Topic to Claude, Cursor, ChatGPT & more
