ServiceBus Topics
  • 06 May 2024
  • 4 Minutes to read
  • Dark
    Light
  • PDF

ServiceBus Topics

  • Dark
    Light
  • 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. BizTalk360 provides an option to monitor Azure ServiceBus Topics and their related Subscriptions under Azure Services. You only need to provide the Namespace connection string and the name of the Topic. This article showcases the end-to-end flow of monitoring Azure ServiceBus Topics and Subscriptions.

Setting up monitoring Azure Service Bus Topics

Follow the below steps to configure Topics in BizTalk360 for monitoring:

  1. Log in to the BizTalk360 application.
  2. Select the 'Environment'
  3. Go to Monitoring -> Manage Mapping ->Azure Services -> Service Bus Queues.
  4. Select the Alarm name (see Manage Alarms) from the drop-down, which you would like to associate the queue for monitoring
  5. The list of queues in the selected subscriptions will be listed. You can choose between subscriptions based on the requirement.
  6. Choose the queue that you wish to monitor and select the check box against the queue.
  7. Set the value of the Expected State by selecting it from the drop-down. For instance, if the current state of the queue is disabled and you want to get notified when it is not disabled, then you need to set the expected state as ‘disabled.’
  8. You can also set monitoring rules by providing threshold values for the available metrics and monitor the queues.

Configuring Monitoring Rules for Subscriptions

Once the Topic is added, the Subscriptions available under that topic will be automatically listed. Follow the below steps to configure the monitoring threshold rules for the Subscriptions:

  1. Click on the topic which lists the available Subscriptions along with their state, total message, and active messages.
  2. Click on the subscription, which opens the subscription configuration blade, where you can configure the monitoring rule for the subscription. The following subscription metrics can be monitored: 
    • Subscription state 
    • Message Count 
    • Active Message Count 
    • Schedule Message Count 
    • Dead Letter Message count 
    • Transfer Message Count 
    • Transfer Dead Letter Message Count

Note
  • Deleting the monitoring configuration of a Topic also deletes the associated Subscription monitoring configuration.
  • When the configured Topic is not reachable, it will be moved to an Orphaned state. Such Topics can be removed by using the Remove Orphaned option. 
  • Email Template - This feature is introduced in v10.1 so when you upgrade from previous versions v9 or v10, it's advised to restore the email template after the upgrade, to get a detailed Topics alert.
  • Subscription monitoring is optional. A Topic can have more than one subscription and it's not mandatory to monitor all the subscriptions under the topic; you can monitor the required subscription alone.

Overview of the Mapped Service bus topics

Once the service bus topics and subscriptions are mapped for monitoring, the health status of the queues will be shown in dashboard in a graphical tree view.  If the topics or subscriptions mapped is violated, it will be listed in the errors and warnings along with the associated alarms. You can also navigate to the respective topics on clicking them.

In order to receive email notifications from BizTalk360 on the threshold violation alerts, you need to configure the 'SMTP settings' under 'BizTalk360 Settings'. Follow the steps in this article to be able to configure the SMTP settings in BizTalk360. You will receive an email notification with the exact details of the status of the Azure Service Bus topics.

Migrating from v10.5?

  • Service Bus Topics Monitoring is moved under Azure Service (Monitoring->Manage Mapping->Azure Service).
  • Service Bus Topics can be monitored by adding their subscription. Whereas in previous versions users need to add the topics using the namespace to monitor. 

After Migrating to v10.5, The Topics mapped for monitoring in previous versions will not be listed in the manage mapping sections, only in the dashboard you can see the topics that have been mapped for monitoring, but it does not have the current monitoring status. Follow the below steps to monitor the service Bus topics after the 10.5 upgrade,

  1. Navigate to the Feature migration page in settings, you can see the migration status for Service Bus Queue as the failed. 
  2. Follow this article and add azure subscription to BizTalk360.
  3. Move to the Feature migration page and click the 'Retry Migration' option. Now the migration status of the service bus queue will become a success.
  4. Now on successful migration, the service bus topics available under the added subscription will get listed under Manage Mapping ->azure Service. You can select the queues and configure threshold rules for monitoring. 

Was this article helpful?