Azure Service Bus Queue Test
Azure Service Bus supports a set of cloud-based, message-oriented middleware technologies including reliable message queuing and durable publish/subscribe messaging. The messaging entity that forms the core of the messaging capabilities in Service Bus is the Queue.
Messages are sent to and received from queues. Queues store messages until the receiving application is available to receive and process them. With queues, the producers (senders) and consumers (receivers) don't have to send and receive messages at the same time. That's because messages are stored durably in the queue. Furthermore, the producer doesn't have to wait for a reply from the consumer to continue to process and send messages. Queues also enable producers and consumers to send and receive messages at different rates.
However, if a queue does not have enough processing power in the form of memory, then it may not be able to process the messages quickly and send them to the consumers. Similarly, if adequate worker processes are not available for a queue to service its load, then processing latencies are a given. The result? - the message consuming application may experience delays and performance deficiencies. Leave alone delays! If queues consistently and completely fail to process messages, then enterprises may be forced to look for other middleware technologies, the aforesaid benefits of Azure Service Bus queues notwithstanding! Such an outcome becomes inevitable if queues fail to process transactions that combine a set of business-critical operations!.
To avoid this, administrators should track the workload of each queue, periodically check if every queue has the resources (memory and worker processes) it requires to process the load, identify queues that are poorly-sized, and increase their processing power. Additionally, administrators should also be able to promptly capture queues that are unable to process messages and take appropriate action, so as to ensure the uninterrupted flow of messages. This is where the Azure Service Bus Queue test helps!
This test auto-discovers the Azure Service Bus queues that have been created for each Service Bus of the monitored subscription. For each queue so discovered, the test then reports the current status of the queue, and alerts administrators to disabled queues. The test also reports the memory used per queue, thus pointing you to queues that are rapidly running out of memory. Additionally, the test tracks the workload of each queue in terms of the count of messages in that queue and the number of messages actively processed by it. In the process, the test pinpoints queues that may not have require more processing power to process its workload. Furthermore, the test also leads you to queues that are unable to process one/more messages/transactions. Using detailed diagnostics, you can deduce the reason for such failures - did an improper configuration setting (eg., a wrong expiration setting) on the queue force the failure? or did the application explicity reject messages and cause the failure? With the help of these pointers, you can eliminate the underlying cause of the failure, and ensure that business-critical operations that may have halted because of the failure resume quickly.
Target of the Test: A Microsoft Azure Subscription
Agent deploying the test: A remote agent
Output of the test: One set of results for each Service Bus queue created in every Service bus configured for every resource group in the target Azure Subscription
Parameters | Description |
---|---|
Test Period |
How often should the test be executed. |
Host |
The host for which the test is to be configured. |
Subscription ID |
Specify the GUID which uniquely identifies the Microsoft Azure Subscription to be monitored. To know the ID that maps to the target subscription, do the following:
|
Tenant ID |
Specify the Directory ID of the Azure AD tenant to which the target subscription belongs. To know how to determine the Directory ID, refer to Configuring the eG Agent to Monitor a Microsoft Azure Subscription Using Azure ARM REST API. |
Client ID, Client Password, and Confirm Password |
To connect to the target subscription, the eG agent requires an Access token in the form of an Application ID and the client secret value. For this purpose, you should register a new application with the Azure AD tenant. To know how to create such an application and determine its Application ID and client secret, refer to Configuring the eG Agent to Monitor a Microsoft Azure Subscription Using Azure ARM REST API. Specify the Application ID of the created Application in the Client ID text box and the client secret value in the Client Password text box. Confirm the Client Password by retyping it in the Confirm Password text box. |
Proxy Host and Proxy Port |
In some environments, all communication with the Azure cloud be routed through a proxy server. In such environments, you should make sure that the eG agent connects to the cloud via the proxy server and collects metrics. To enable metrics collection via a proxy, specify the IP address of the proxy server and the port at which the server listens against the Proxy Host and Proxy Port parameters. By default, these parameters are set to none, indicating that the eG agent is not configured to communicate via a proxy, by default. |
Proxy Username, Proxy Password and Confirm Password |
If the proxy server requires authentication, then, specify a valid proxy user name and password in the Proxy Username and Proxy Password parameters, respectively. Then, confirm the password by retyping it in the Confirm Password text box. |
Detailed Diagnosis |
To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:
|
Measurement | Description | Measurement Unit | Interpretation | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Queue entity status |
Indicates the current status of this queue. |
|
The values reported by this measure and its numeric equivalents are mentioned in the table below:
Note: By default, this measure reports the Measure Values listed in the table above to indicate the current status of the the service bus queue. In the graph of this measure however, the same is represented using the numeric equivalents only. Use the detailed diagnosis of this measure to know the location of the service bus queue, when it was created, when it was last modified, and configuration settings governing the 'life' of messages in the queue. |
||||||||||||||||||||
Total memory |
Indicates the total memory capacity of this service bus queue. |
MB |
|
||||||||||||||||||||
Used memory |
Indicates the amount of memory currently used by this service bus queue. |
MB |
Ideally, the value of this measure should be low. |
||||||||||||||||||||
Free memory |
Indicates the amount of memory that is still available for use by this queue. |
MB |
Ideally, the value of this measure should be high. |
||||||||||||||||||||
Memory utilization |
Indicates the percentage of memory used by this queue. |
Percent |
A value close to 100% indicates that the service bus queue is running out of free memory. Without sufficient free memory, the queue will not be able to store/process messages. To avoid this, you may want to increase the memory capacity of the queue or declutter the queue by deleting unwanted messages from it. |
||||||||||||||||||||
Total messages |
Indicates the total number of messages in this queue. |
Number |
|
||||||||||||||||||||
Active messages |
Indicates the number of messages in this queue that are being actively processed. |
Number |
This is a good indicator of the current workload of a queue.
|
||||||||||||||||||||
Scheduled messages |
Indicates the number of messages in this queue that are scheduled to be delivered at a later time. |
Number |
In messaging, you can send a message to a queue/topic for delayed processing. Those messages are called scheduled messages. Unlike regular messages, scheduled messages don’t appear in the queue until the defined enqueue time. For example, you can schedule a message at 12 pm and send it to a queue at 10 pm. The message will be invisible for consumers until 12 pm. It will be appended to the queue as a new message at 12 pm. |
||||||||||||||||||||
Dead-letter messages |
Indicates the number of messages in this queue that were moved to the dead-letter queue during the last measurement period. |
Number |
Azure Service Bus queues and topic subscriptions provide a secondary subqueue, called a dead-letter queue (DLQ). The purpose of the dead-letter queue is to hold messages that cannot be delivered to any receiver, or messages that could not be processed. Ideally therefore, the value of this measure should be 0. A non-zero value implies that one/more messages have been moved to the DLQ. In this case, its important to know why messages could not be delivered/processed. In fact, there are several activities in Service Bus that cause messages to get pushed to the DLQ from within the messaging engine itself. The common reasons are as follows:
An application can also explicitly move messages to the DLQ for reasons other than the ones stated above. Messages can be so moved owing to system issues, it they hold malformed payload, or if they fail authentication when some message-level security scheme is used. |
||||||||||||||||||||
Transfer messages |
This measure will be reported only if the queue being monitored is a transfer queue. In which case, this measure indicates the number of messages in this transfer queue. |
Number |
A transaction groups two or more operations together into an execution scope. By nature, such a transaction must ensure that all operations belonging to a given group of operations either succeed or fail jointly. Service Bus supports grouping operations against a single messaging entity (queue, topic, subscription) within the scope of a transaction. For example, you can send several messages to one queue from within a transaction scope, and the messages will only be committed to the queue's log when the transaction successfully completes. To enable transactional handover of data from a queue or topic to a processor, and then to another queue or topic, Service Bus supports transfers. In a transfer operation, a sender first sends a message to a transfer queue or topic, and the transfer queue or topic immediately moves the message to the intended destination queue or topic using the same robust transfer implementation that the autoforward capability relies on. |
||||||||||||||||||||
Trransfer dead-letter messages |
This measure will be reported only if the queue being monitored is a transfer queue. In which case, this measure indicates the number of messages in this transfer queue that were sent to the transfer dead-letter queue. |
Number |
Ideally, the value of this measure should be 0. If a non-zero value is reported, it means the one/more messages in the transfer queue have been dead-lettered. Messages will be sent to the transfer dead-letter queue under the following conditions:
|
Use the detailed diagnosis of the Queue entity status measure to know the location of the service bus queue, when it was created, when it was last modified, and the configuration settings governing the 'life' of messages in the queue. These settings will help you troubleshoot abnormal dead-lettering on the queue.
Figure 3 : The detailed diagnosis of the Queue entity status measure