Active Messages processing
  • Updated on 29 Apr 2019
  • 5 minutes to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Active Messages processing

  • Print
  • Share
  • Dark
    Light

The features explained in this document are applicable to both Service Bus Queues and Topics

The Challenge

The real-world domains require real messaging, that means supporting features that involve compute and processing behind the scenes on behalf of the service. That’s where Azure Service Bus (ASB) service shines. The features it provides are genuinely impressing. Some of those are:

  • Scheduling
  • Dead-lettering
  • Transactional processing
  • Message ordering
  • Expiration (TTL)
  • Duplicate detection
  • Deferring
  • Pub/Sub
  • Filtering
  • and more

The service goes beyond simple queueing and exhibits all the necessary features commonly found in the enterprise line of business application and systems.

The real challenge in dealing with Service Bus Queues/ Topics in the Azure portal is there is no visibility on the messages, the Service Bus Queues or Topic Subscriptions hold. In real time, there is immense need to access and process the Service Bus messages to keep the business going.
Serverless360 provides out of box message processing capabilities to overcome the challenges in dealing with Service Bus messages in the Azure Portal

Retrieve messages

In Serverless360, execute queries to retrieve messages from Queues in 'peek lock' mode. When the query is executed, Serverless360 retrieves the list of messages in peek lock mode along with necessary message information such as sequence number, size, label, enqueued time, expiry time, message details and properties. It is possible to retrieve both active and dead letter messages in Service Bus Queues and Topic Subscriptions.

retrieve-messages.gif

Message Processing on Service Bus Queues

Message processing capability in Serverless360 supports processing of active messages in addition to processing dead letter messages. Execute queries to retrieve 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.

Different modes of message retrieval possible on Service Bus Queues and Topic Subscriptions in Serverless360.

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/ Topic Subscription. Message in source Queue/ 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 Queue/ Topic. Message in source Queue/ Topic Subscription will not be deleted.
Retrieving messages in this mode will move the message to a 'Deferred' queue and it can be processed later. This process increases the delivery count of the message.
  • Resubmit – A copy of a message will be submitted to the target Queue/ Topic Subscription. Message in source Queue/ Topic Subscription will not be deleted.
  • Resubmit and Delete – A copy of a message will be submitted to the target Queue. Message in source Queue/ Topic Subscription will be deleted.
  • Repair and Resubmit - A copy of a message with updated content and properties will be submitted to the target Queue/ Topic Subscription. Message in source Queue/ 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 Queue/ Topic Subscription. Message in source Queue/ Topic Subscription will be deleted.
  • Delete – Message will be deleted from the Queue/ Topic Subscription.

Below is an illustration to process the active messages in the Service Bus Queue/ Topic Subscription associated with a Serverless360 Composite Application.
active-message-processing-queues.gif

To access a deferred message, it is required to know the message sequence number. With Serverless360 get to access all the messages in the deferred state in a Service Bus Queue/ Topic Subscription without need to know their sequence number. Find the messages in the Deferred Messages tab

Purge messages

If the requirement is to purge all active messages in a Service Bus Queue/ Topic Subscription to completely clear its contents, it’s quite straight forward using Serverless360. Below is an illustration on the inline Purge Messages activity to purges either all or specific count of messages from a Service Bus Queue/ Topic Subscription.

pricing

Regenerate/Modify or Edit a message ID

Message submitted to a Service Bus entity with 'Enable Duplicate Detection' checked will get lost if its message id is found to be duplicate within the Duplicate Detection History time frame

When you try to resubmit a message to a Queue/ Topic Subscription with 'Enable Duplicate Detection' property checked, Serverless360 will help preventing the message from being lost by prompting you to regenerate the message id to be unique. Choose between the options, either assign a new GUID as Message Ids or edit to set custom message ids. for e.g.: invoice/201#/####.
Regenerate-message-ID.gif

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 processing active messages,
activemsgProcessing_backup(1)

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

Govern and Audit on Message Processing

When back up is enabled on a message processing 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.
active_msg_Processing_G&A

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

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?