Azure Service Bus Topics
  • 29 May 2024
  • 4 Minutes to read
  • Dark
  • PDF

Azure Service Bus Topics

  • Dark
  • PDF

Article summary

A queue allows processing of a message by a single consumer. In contrast to queues, topics and subscriptions provide a one-to-many form of communication in a publish and subscribe pattern. It's useful for scaling to large numbers of recipients. Each published message is made available to each subscription registered with the topic. Publisher sends a message to a topic and one or more subscribers receive a copy of the message.

Let's assume a scenario where a user is building an e-commerce platform where customers can place orders, and these orders need to be processed in real-time by various components of your system. When a customer places an order on your website, the order details are sent to a Service Bus Topic called "NewOrders". 

As orders progress through different stages (e.g., payment confirmed, shipped), you can use additional topics like "OrderStatusUpdates" to broadcast these updates. Subscribers, such as customer notification services or order tracking systems, can receive these updates in real-time and provide timely information to customers about their orders.

In this scenario, Azure Service Bus Topics enable seamless communication between different parts of the e-commerce platform, ensuring efficient order processing and timely updates for customers, all while providing scalability and reliability essential for a modern e-commerce system.

Manage Service Bus Topics and Subscription from BizTalk360 

To manage Service Bus Topics and subscriptions via BizTalk360, users need to first add their respective Azure subscriptions. Take a look into this article to know how to add azure subscriptions. Users have the flexibility to add multiple Azure subscriptions.

Once added, these subscriptions are listed in a dropdown menu. Users can effortlessly switch between subscriptions to manage their Azure Service Bus Topics and subscriptions. 

  • All the service bus topics and subscriptions are displayed based on the selected subscription in the dropdown menu, showcasing their state and message count details. 
  • Select a topic or subscription from the list and click on the eye icon to view the topic and its properties in detail. 
  • The topic property blade lists topics details such as Subscription, Resource group, Creation Time, Status, etc. and Message properties such as Message counts, sizes, etc. 
  • The rich query filter capability allows the user to filter the query based on topic Name, Status, Resource group, and Namespace. Save the query and pin for quick access.

Modify the State of Topics and Subscriptions

Azure Service Bus Topics can exist in various states depending on their activity and configuration. Here are some common states:

  • Active - Topics/Subscriptions in this state are operational and ready to receive and deliver messages.
  • Disabled Topics/Subscriptions in this state are temporarily inactive. Messages cannot be sent to or received from a disabled topic. 
  • Suspended - Topics/Subscriptions can enter this state due to issues such as quota violations, disabling of subscriptions or other operational problems. While suspended, the topic cannot process messages.
  • Send Disable - User can’t send messages to Subscription (This state is applicable only for Topics). 
  • Receive Disable - Subscription can't receive messages from Topics (This state is applicable only for Subscription).

Users can modify the state of topics/subscriptions by selecting them and choosing the desired state (such as Active, Disabled, Send Disabled, or Receive Disabled). Once the action is succeeded, this change will be applied to the respective topics in the Azure subscription.

Process Messages in Topics and Subscriptions

BizTalk360 provides an option to users to process the messages within a topic/subscription. Processing messages in topics commonly includes:

  • Send Message - This process involves adding a new message to the topic. Messages can contain various data or payloads that needs to be processed by the receiving application. Begin by choosing a topic and selecting the "Message" button, offering options to send, upload, and purge. Select the "send" option, which opens the send message blade. Within this blade input the desired message content and specify the count of messages to send, then proceed by clicking send. Additionally, user properties can be pushed from here.

  • Upload Message - In scenarios where multiple messages need to be sent to the topic simultaneously, you can upload a batch of messages in a single operation. This helps optimize performance and reduces the overhead of sending individual messages. This process can be performed by updating the message in excel and uploading the excel workbook. Each message updated in excel should have values for Message-Id, Message Content, system, and Custom properties must be updated in excel to upload the message. Users can download the template from the upload message blade and use the same to modify the contents and upload.  

  • Purge Message - Purging the messages in a topic involves removing all messages or specific messages currently stored in the topic. This operation is typically used when you want to clear the topic of any existing messages, either for cleanup purposes or as part of a maintenance operation. The purge option in BizTalk360 allows users to delete the Active and Dead letter messages from the topics. Users can delete all the messages or delete few messages by specifying the count. If there are no messages available in the topics, an indication "Active/Dead letter message not found" is shown. 

Access and Security 

  • All state change operations and message processing actions executed by users are systematically recorded and audited within the Governance and Audit section. 
  • By default, Super users are granted with the ability to manage topics within BizTalk360.
  • For Normal Users / NT Group Users, the following access permissions are necessary to manage service bus topics:
    1. Azure Service Access: Required to view the service bus topics.
    2. Manage Service Bus Topics Permission: Essential for managing the state of topics/subscriptions and processing messages within them.

Was this article helpful?