Service Bus Topic
  • 13 Dec 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Service Bus Topic

  • Dark
    Light
  • PDF

Article summary

Introduction

Service Bus is a messaging service provided by Azure to interconnect applications and services running within a cloud or on-premises solution. It is therefore a component available in any cloud architecture built with Azure.

The Service Bus Topic provides one-to-many communication between the applications. Cerebrata supports the following operations on the Service Bus Topic.

Add messages

In most cases of initial development, there will not be any upstream application to send the messages to the Service Bus Topic. We need to write custom code to send the messages. Cerebrata eliminates this need for custom code by allowing us to send messages with required custom properties based on the data types, message content, and enqueued time. It is also possible to set the batch size. For example, we can send 100 messages with a batch size of 20 and a Think time of 1000 ms, So that 20 messages will be sent in 5 batches at an interval of 1000 ms between each batch.

Messages received by topic subscription with date time custom properties will appear as an epoch timestamp value.

The below illustration shows how to send messages to a topic.

AddMessagestopics

Add Topic

As a first step in developing a Cloud architecture, it is often necessary to create Topics with different properties to implement the required functionalities. Cerebrata makes this possible.

Service Bus Topics can be created with properties such as Enable Express, Enable Batch operations, Enable Message Ordering, Enable Requires Duplicate Detection, etc.

The below illustration shows adding a Service Bus Topic with the required properties.

Topic-Add-Topic

View Properties

It can be difficult to remember the properties of a Topic when there are multiple topics in a Namespace with different properties. Cerebrata allows us to view the properties of a Topic in order to overcome the above challenge.

The below illustration shows how to view the properties of a Topic.

Topic-View-Properties

Update Topic

It is common to update certain properties of the Topic like the max delivery count of the messages, the destination for auto-forwarding active messages, and the destination for auto-forwarding dead-letter messages. Cerebrata helps us in updating the topic properties at ease at any time.

The below illustration shows how to edit the properties of a Topic.

Topic-Update-Properties

Update Status

In some cases, the application may not receive messages from the Topic for some reason. In such cases, it is important to stop sending messages to the Topic. This can be done by setting the status of the Topic to SendDisabled.

The below illustration shows how to edit the status of a Topic.

Topic-Update-Status

Delete Topic

It is also necessary to delete the topics that are of no use in the namespace to prevent the unwanted cost incurred due to the messages in them.

The below illustration shows how to delete a Topic.

Topic-Delete-Topic


Was this article helpful?