• Print
  • Share
  • Dark
    Light

Azure Service Bus Management

  • Updated on 18 Feb 2019
  • 15 minutes to read
  • Contributors

Microsoft Azure Service Bus is a reliable information delivery service. The purpose of this service is to make communication easier. When two or more parties want to exchange information, they need a communication facilitator. Within a Service Bus namespace, you can use one or more instances of two different communication mechanisms, each of which connects applications in a different way. The choices are:

  • Queues, which allow one-directional communication. Each queue acts as an intermediary (sometimes called a broker) that stores sent messages until they are received. Each message is received by a single recipient.
  • Topics, which provide one-directional communication using subscriptions-a single topic can have multiple subscriptions. Like a queue, a topic acts as a broker, but each subscription can optionally use a filter to receive only messages that match specific criteria.

Challenges in managing Azure Service Bus

Service Bus is a communication mechanism in the cloud that's accessible from pretty much anywhere. The operations and management of a solution are always an after thought for decades. The architects and developers focus mainly on delivering the solution to the business and pay very little attention to how that solution can be managed and operated on a daily basis.
Your support team spends a lot of time on day-to-day operations to regulate activities like:

  1. Make sure Azure Service Bus resources are up and running and notify someone during downtime.
  2. Resubmit messages that get stuck in your Service Bus dead letter queue based on business requirements
  3. Change certain properties of the service like increasing the time-to-live values of the queues.
  4. May be change the subscription rules on the Service Bus Topics
  5. Trace a message that's been lost in the translation somewhere in the solution

Serverless360 Capabilities

Azure Service Bus Queues Azure Service Bus Topics
Create and delete Queues Create and delete Topics
View and edit properties View and edit properties
Import Queues Import Topics
Retrieve messages Retrieve messages from Topic-Subscription
View and resubmit dead letter messages View and resubmit dead letter messages
View deferred dead letter messages View deferred dead letter messages
Purge Messages Purge messages from Topic-Subscription
Copy Queue URL and view shared access policy Copy Queue URL and view shared access policy
Send messages Send messages
Schedule bulk messages and dead letter messages Schedule bulk messages and dead letter messages
Back-up dead letter messages to Storage Account blob while reprocessing Back-up dead letter messages to Storage Account blob while reprocessing

Azure Service Bus Queues operations

  1. CRUD Operations - From Serverless360 UI, you can create/delete and enable/disable Queues. One of the advantages of using Serverless360 to create Azure Service Bus Queues is the ability to set a variety of properties while creating a Queue. The number of properties that are available to be set while creating a Queue in the Azure portal is limited.

Create-Queue.gif

  1. View and edit properties - When messages accumulate in one of the queues, you can view the queue properties to get more information about the possible causes of this accumulation. When the Queues list is generated in Serverless360, the screen contains a Properties icon against each queue that will contain the properties of the queue. All information in the queue properties blade will be populated from the Azure portal and the values can be edited in Serverless360.

edit-queues.gif

  1. Import Queues - You have an option to import an Azure Service Bus Queues from one namespace to another using Serverless360. Let's consider a scenario, ACME corporation has created and configured the settings for a Queue in their test environment and wants to replicate the same in the development environment, in this scenario, the only option is to recreate the Queues with the same settings either in the Azure portal or in Service Bus Explorer. Obviously, this is a time-consuming process, Serverless360 provides a simple solution by allowing the users to import the Queues between namespace to make the process the easy.

import-queues.gif

  1. Retrieve messages - From Serverless360 UI you can execute queries to retrieve messages from Queues in 'peek lock' mode. When the query is executed, Serverless360 triggers a service call that retrieves the list of messages in peek lock mode. In addition, the service call will retrieve other information related to the message such as sequence number, size, label, enqueued time, expiry time, message details and properties. You can retrieve both active and dead letter messages.

retrieve-messages.gif

  1. Message Processing On Service Bus Queues - Message processing capability in Serverless360 have been extended to support processing of active messages in addition to processing dead letter messages. Execute queries to retrieve dead letter / active messages from Queues in both 'peek lock' and 'defer' mode. In addition, the service call will retrieve other information related to the message such as message id, sequence number, size, label, error reason, enqueued time, expiry time, message details and properties.

    Below is a tabular column which explains different modes of messsage retrieval in Service Bus Queue.

Message Type / Mode Peek Lock Deferred
Active Messages In this mode of retrieval the messages are peeked. It does not increase the delivery count of the message.
  • Resubmit - A copy of a message will be submitted to the target Queue. Message in source Queue will not be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Queue. Message in source Queue will not be deleted.
Retrieving messages in this mode will change the state of the message to 'deferred' which can be processed later. This process increases the delivery count of the messsage.
  • Resubmit – A copy of a message will be submitted to the target Queue. Message in source Queue will not be deleted.
  • Resubmit and Delete – A copy of a message will be submitted to the target Queue. Message in source Queue will be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Queue. Message in source Queue will not be deleted.
  • Resubmit and Delete after Repair - A copy of a message with updated content and properties will be submitted to the target Queue. Message in source Queue will be deleted.
  • Delete – Message will be deleted from the Queue.
Dead Letter Messages In this mode of retrieval the messages are peeked. It does not remove the message from dead letter queue.
  • Resubmit – A copy of a message will be submitted to the target Queue. Message in source dead-letter Queue will not be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Queue. Message in source dead-letter Queue will not be deleted.
Retrieving messages in this mode will change the state of the message to 'deferred' which can be processed later.
  • Resubmit – A copy of a message will be submitted to the target Queue. Message in source dead-letter Queue will not be deleted.
  • Resubmit and Delete – A copy of a message will be submitted to the target Queue. Message in source dead-letter Queue will be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Queue. Message in source dead-letter Queue will not be deleted.
  • Resubmit and Delete after Repair - A copy of a message with updated content and properties will be submitted to the target Queue. Message in source dead-letter Queue will be deleted.
  • Delete – Message will be deleted from the Queue

Below is an illustration to process the active messages in the Service Bus Queue associated with Serverless360.
active-message-processing-queues.gif

Below is an illustration to process the dead letter messages in the Service Bus Queue associated with Serverless360.
dead-letter-message-processing-queues.gif

  1. Purge messages - You cannot delete an individual message from a Queue. Instead, you can purge all messages to completely clear the contents of the queue.

Purge-queues.gif

  1. Regenerate/Modify or Edit a message ID -
    When you try to resubmit a message to a 'DuplicateDetection' enabled Queue, this capability will help you to prevent the message from being lost. When you choose automated regeneration, the system will assign a new GUID as Message Ids. Alternately, you can edit to set custom message ids. for eg: invoice/201#/####.

Regenerate-message-ID.gif

Azure Service Bus Topics operations

  1. CRUD Operations - Create/delete and enable/disable Topics and Topics-Subscriptions from Serverless360 UI. A subscription to a topic resembles a virtual queue that receives copies of the messages that were sent to the topic. You can optionally register filter rules for a topic on a per-subscription basis, which enables you to filter or restrict which messages to a topic are received by which topic subscriptions.

CRUD-Topics.gif

  1. View and edit properties - Messages that have specific characteristics must be processed in different ways. To enable this, you can configure Topics and subscriptions to find messages that have desired properties and then perform certain modifications to those properties.

Edit-Topic-Properties.gif

  1. Import Topics - Let's consider a scenario, NorthWind corporation has created and configured the settings for Topics in their test environment and wants to replicate the same in the development environment, in this scenario, the only option is to recreate the Topics with the same settings either in the Azure portal or in Service Bus Explorer. Obviously, this is a time-consuming process, Serverless360 provides a simple solution by allowing the users to import the Topics between namespace to make the process easy.

Import-Topic.gif

  1. Retrieve messages from Topic-subscriptions -
    Azure Service Bus Topics are based on the publish/subscribe pattern, messages are sent to Topics, but applications receive the messages from Subscriptions. Subscriptions are similar to the dequeuing end of a Queue. Applications receive messages from subscriptions in exactly the same way that they receive them from Queues. Serverless360 allows users to execute queries to retrieve messages from Topic-Subscription in 'peek lock' mode. When the query is executed from the UI, Serverless360 triggers a service call that retrieves the list of messages in peek lock mode. In addition, the service call will retrieve other information related to the message such as sequence number, size, label, enqueued time, expiry time, message details and properties. In Serverless360, the users can retrieve both active and dead letter messages.

View-Topic-Messages.gif

  1. Message Processing On Service Bus Topics - Message processing capability in Serverless360 have been extended to support processing of active messages in addition to processing dead letter messages. Execute queries to retrieve dead letter / active messages from Topic Subscriptions in both 'peek lock' and 'defer' mode. In addition, the service call will retrieve other information related to the message such as message id, sequence number, size, label, error reason, enqueued time, expiry time, message details and properties.

    Below is a tabular column which explains different modes of messsage retrieval in Service Bus Topic Subscriptions.

Message Type / Mode Peek Lock Deferred
Active Messages In this mode of retrieval the messages are peeked. It does not increase the delivery count of the message.
  • Resubmit - A copy of a message will be submitted to the target Topic. Message in source Topic Subscription will not be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Topic. Message in source Topic Subscription will not be deleted.
Retrieving messages in this mode will change the state of the message to 'deferred' which can be processed later. This process increases the delivery count of the messsage.
  • Resubmit – A copy of a message will be submitted to the target Topic. Message in source Topic Subscription will not be deleted.
  • Resubmit and Delete – A copy of a message will be submitted to the target Topic. Message in source Topic Subscription will be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Topic. Message in source Topic Subscription will not be deleted.
  • Resubmit and Delete after Repair - A copy of a message with updated content and properties will be submitted to the target Topic. Message in source Topic Subscription will be deleted.
  • Delete – Message will be deleted from the Topic Subscription.
Dead Letter Messages In this mode of retrieval the messages are peeked. It does not remove the message from dead letter end.
  • Resubmit – A copy of a message will be submitted to the target Topic. Message in source dead-letter Topic Subscription will not be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Topic. Message in source dead-letter Topic Subscription will not be deleted.
Retrieving messages in this mode will change the state of the message to 'deferred' which can be processed later.
  • Resubmit – A copy of a message will be submitted to the target Topic. Message in source dead letter Topic Subscription will not be deleted.
  • Resubmit and Delete – A copy of a message will be submitted to the target Topic. Message in source dead letter Topic Subscription will be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Topic. Message in source dead letter Topic Subscription will not be deleted.
  • Resubmit and Delete after Repair - A copy of a message with updated content and properties will be submitted to the target Topic. Message in source dead letter Topic Subscription will be deleted.
  • Delete – Message will be deleted from the Topic Subscription

Below is an illustration to process the active messages in the Service Bus Queue associated with Serverless360.
active-message-processing-topic-subscriptions.gif

Below is an illustration to process the dead letter messages in the Service Bus Queue associated with Serverless360.
dead-letter-message-processing-topic-subscriptions.gif

  1. Purge messages - You cannot delete an individual message from a Topic-Subscription. Instead, you can purge all messages to completely clear the contents of the Topic-Subscription.

Purge-Topic-Messages.gif

Templates Configuration

Let’s consider a scenario, NorthWind corporation need to create some twenty Service Bus queues, all with similar property definition. This would demand immense manual effort to define the same set of properties while creating all twenty entities. To overcome this problem, Serverless360 comes with solution called “Templates”. Template is a saved property configuration which can be applied on the queue being created. Below are the steps to create, manage and apply the templates.

Below is the illustration to guide on creating a template:
template section

Below is the illustration to guide on applying a template:
applying Template properties

Serverless360 templates on property configuration is right now supported for Service Bus Queues, Topics and Topic Subscriptions, Event Hubs and Relays

Backup messages

Serverelss360 offers out of box message processing capabilities on Service Bus Queues and Topics Subscriptions. There could be business scenarios those demand to retain a copy of a Service bus messages being processed. Hence the back up to Storage blob capability was introduced.
In Serverless360, it is possible to back up the Service Bus messages being processed to a Storage blob associated in the same Composite Application, in which the Service Bus entity exists. It is possible to have multiple Storage Blob Containers associated in a Composite Application. The decision on back up target can be made in run time while performing message processing.
Below is an illustration on message back up to associated Storage blob while dead letter processing,
Backingup messages.gif

On successful resubmission the success notification will contain the blob URI where the backed-up message can be accessed from. Even in case of failure in resubmission the message will be backed-up. This behaviour holds good for of all the dead letter management scenarios, delete, repair and resubmit and resubmit.

Success.png

When back up is enabled on a dead letter action, the back-up URI will be captured in the Governance & Audit record corresponding to this action. This detail can also be exported to Excel or PDF format using the export capability in Governance & Audit.

These Storage blobs to which the messages had been backed-up can also be monitored from Serverless360 itself. Refer the article on ‘Monitoring Storage Accounts’ for more details

Activities Configuration

Sending messages to a Queue or Topic is similar to sending events to an Event Hub. Serverless360 has the capability to send events/messages immediately from the list of Queues/Topics by creating an Activity Configuration. Activity Configuration has been introduced considering the re-usability.

What is an Activity?

Activities allow you to push sample messages into desired Queues or Topics. It can be used mainly for testing purposes. Ex: Sending 5000 sample messages into a Queue with think time, batches, multiple threads etc. You can have multiple activities configured and executed them either instantaneously or via a schedule.

Serverless360 has the option to send messages from the listed Queues/Topics by simply entering the desired values and hit the Send button. As every task is processed in the cloud – it will queue the task to a certain queue from where it will be picked up and processed. However, the processing is fast enough and you will be able to see the in-progress activity in “In Progress” tab. Sometimes you may not find an activity in “In Progress” tab if the number of events is too small. As the process is quick – the process might be completed momentarily. Read Automated Activities for more details

Activities.gif

Monitoring Service Bus Resources

When an Service Bus resource is associated with a Composite Application, you can enable either an threshold alarm to trigger alerts to the configured notification channel(s) by comparing the current value against the expected value or set a health alarm to check the health status. You can read extensive documentation on Monitoring here.

We'd love to hear your thoughts
Please visit our feedback system to suggest new Features or Enhancements. You can also take a look at our Roadmap
Was this article helpful?