Co-authors: @Anu Judson @Neena P K
IBM App Connect continues to expand its integration capabilities with the introduction of two new connectors: Microsoft Azure Cosmos DB and Microsoft Azure Service Bus. These additions enable users to seamlessly connect and automate workflows across Microsoft Azure services and other enterprise applications.
Microsoft Azure Cosmos DB
Azure Cosmos DB is a globally distributed, multi-model database service from Microsoft, which is designed to provide high availability, scalability, and low-latency access to data for modern applications.
To allow App Connect to connect to your Microsoft Azure Cosmos DB account, you need to fill in the connection fields that you see in the App Connect Designer page or flow editor.
Supported authorization methods:
Supported objects in Microsoft Azure Cosmos DB
Object |
Description |
Custom SQL queries |
Allows you to run custom SQL queries. |
Items |
Use this object to create, retrieve, update, and delete items in the Azure Cosmos DB container. |
For detailed information about different authorization types, a list of supported actions and events, how to generate connection field values, and how to use the Templates gallery, see How to use IBM App Connect with Microsoft Azure Cosmos DB on the IBM Documentation page.
Microsoft Azure Service Bus
Azure Service Bus is a fully managed, cloud-based messaging service that facilitates communication between applications and services by using messages.
To allow App Connect to connect to your Microsoft Azure Service Bus account, you need to fill in the connection fields that you see in the App Connect Designer page or flow editor.
Supported authorization methods:
Supported objects in Microsoft Azure Service Bus
Object |
Description |
Messages |
The messaging system in Microsoft Azure Service Bus queues and topics. Use this object to acknowledge, peek and lock, receive and commit, and send messages. |
Queues |
The queueing service in Microsoft Azure Service Bus. Use this object to create, retrieve, update, and delete queues from Azure Service Bus. |
Subscriptions |
The subscription service in the Microsoft Azure Service Bus topic. Use this object to create, retrieve, update, and delete subscriptions from the Azure Service Bus topic. |
Topics |
The topic service in Microsoft Azure Service Bus. Use this object to create, retrieve, update, and delete topics from the Azure Service Bus. |
For detailed information about different authorization types, a list of supported actions and events, how to generate connection field values, and how to use the Templates gallery, see How to use IBM App Connect with Microsoft Azure Service Bus on the IBM Documentation page.
Use case 1: Create a message in a new Google Pub Sub topic using data from Azure Cosmos DB when a new message is received
Scenario
When a new message is received in a Google Cloud Pub/Sub topic, IBM App Connect retrieves related data from Azure Cosmos DB and publishes a new message to another Pub/Sub topic.
Flow overview

- Trigger: A new message is received in a Google Cloud Pub/Sub topic.
- Action 1: Retrieve an item using its identifier from Azure Cosmos DB using the Order ID and Company attributes.
- Action 2: Publish a new message to a different Pub/Sub topic with the related content.
Steps
-
Configure the Google Cloud Pub/Sub connector to trigger the flow when a new message is received in a particular topic, using a subscription.
-
Use the Azure Cosmos DB connector to retrieve an item from the container and the database. Filter the query using the Order ID and Company attributes from the incoming message.
-
Use the Google Cloud Pub/Sub connector to publish a new message to a different topic. The message should include the original data along with the Status and Estimated delivery fields retrieved from Azure Cosmos DB.
Use case 2: Route messages from Azure Service Bus queue to Cosmos DB, then forward to another queue, and acknowledge the message
Scenario
Messages arriving in an Azure Service Bus queue are parsed, enriched with data from Azure Cosmos DB, forwarded to another queue, and then acknowledged.
Flow overview

- Trigger: A new message is received in the routing queue.
- Action 1: Parse the stringified message body to work with the original data.
- Action 2: Retrieve the corresponding item from Azure Cosmos DB.
- Action 3: Send a new message to another Azure Service Bus queue.
- Action 4: Acknowledge the original message.
Steps
-
Create an event-driven flow that listens to messages from the routing queue in Azure Service Bus. Leave the receive mode field empty to use the default mode, which is peek-lock.
-
Add a JSON parser node to deconstruct the message body. This step is necessary because the message body is a stringified JSON object.
-
From the parsed message, extract the ID value. Use this value to retrieve the corresponding item from Azure Cosmos DB by using the Retrieve item by ID action.

-
Use the retrieved data from Azure Cosmos DB to determine which Topic to send the incoming message to. Using the Azure Service Bus Send message node, the retrieved values are mapped to the Entity type, Entity, and Message body fields.

-
After the message is sent to the target queue, use the Azure Service Bus Acknowledge a message node to confirm successful processing. This step ensures that the original message is acknowledged and removed from the routing queue.

Resources
- To get started with IBM App Connect, visit https://www.ibm.com/products/app-connect
- You can view this template and other useful templates in the Templates gallery of your App Connect Designer instance or the IBM Automation Explorer page.
- If you already have an App Connect designer instance, use the following URL to directly access the template.
- You also have the option to import the .yaml file for this template directly into your App Connect Designer instance. These templates are available in a public GitHub repository.