• LOGIC
  • AUTOMATION
  • CONTROL
  • HUMAN

How to route messages with metadata with your AI

Connect your AI to Azure Service Bus to handle complex message distribution. Your agent handles the logic of tagging payloads so the infrastructure does the routing.

Ask AI about this page

Short answer

How can my AI route messages to specific subscriptions?

Your AI uses the publish_message tool to include custom properties in the message payload. These properties act as keys that Azure Service Bus uses to match messages to specific subscriptions. You get precise control over message delivery without manual filtering.

Where messages land.

Targeted message delivery.

The AI decides which subscription gets which message based on the metadata it attaches.

LOGIC

Targeted delivery

The AI identifies the necessary routing keys for a specific payload. It ensures the message hits the right subscription immediately.

AUTOMATION

Zero manual filtering

Because the AI attaches the metadata, your downstream services don't have to sift through irrelevant traffic. Everything arrives pre-sorted.

CONTROL

Custom properties

You tell the AI which attributes matter for routing. It maps your intent to the specific metadata fields required by your topic.

HUMAN

Manual overrides

If a message lacks the right properties, it won't match a subscription. You'll need to step in to fix the payload or the routing rules.

The workflow

What your AI does when a message arrives.

The AI acts as the intelligent bridge between your intent and the Service Bus infrastructure.

  1. Analyze intent

    Your agent looks at the data you want to send and determines which routing properties are needed to satisfy your subscription filters.

    publish_message
  2. Attach metadata

    The AI prepares the payload by injecting the specific custom properties required for the topic's rules.

    publish_message
  3. Send payload

    The agent executes the delivery by pushing the tagged message into the Azure Service Bus Topic.

    publish_message
  4. Confirm delivery

    The AI verifies the message was successfully handed off to the bus so you know the routing logic worked.

    publish_message

Try it

Copy these to start.

Use these prompts to trigger the routing logic.

Starting points

Swap out the bracketed text for your actual topic names and property keys.

Azure Service Bus Topic Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_5Ndl1HpvG81fn9zpmbqNjYAklodQCPYPAfw3rSIk/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Azure Service Bus Topic capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "azure-service-bus-topic-alternative-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_5Ndl1HpvG81fn9zpmbqNjYAklodQCPYPAfw3rSIk/mcp"
    }
  }
}
Copy into chat04
  • Publish a message to the 'orders-topic' and add a 'region' property set to 'north-america'.

  • Send a message to the 'sensor-data' topic with a custom metadata property 'priority' set to 'high'.

  • Route this JSON payload to the 'telemetry' topic using 'device_id' as the routing key.

  • Add a 'tenant_id' property to this message before publishing it to the 'user-events' topic.

  • 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 immediately start telling your AI to publish and route messages.

Connect Azure Service Bus Topic to your AI

FAQ

How this task behaves.

  • 01

    Can the AI create new subscriptions in Azure?

    No. The AI can only publish messages with metadata to existing topics and subscriptions.

  • 02

    What happens if the AI uses the wrong metadata key?

    The message will be published, but it won't match your subscription filters. It will sit in the topic or go to a dead-letter queue if you have one configured.

  • 03

    Does the AI decide the routing rules?

    No. The routing rules are set in your Azure Service Bus configuration. The AI only provides the metadata that those rules look for.

  • 04

    Can I send large files through this connector?

    The AI sends messages via the publish_message tool. The size is limited by the standard Azure Service Bus message constraints.

  • 05

    Will the AI delete messages from the queue?

    No. This connector only has the capability to publish messages. It cannot read, move, or delete messages from your subscriptions.

  • 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