Many enterprises use Service Bus entities and Event Hubs to communicate between different services. As a part of integrating the services together, it is important to ensure that the message flow across the services is healthy. Serverless360 provides a capability to automate the process of sending, deleting and resubmitting messages to Service Bus entities and facilitate the above-mentioned requirement.
Consider a scenario where an application which listens for messages from a Service Bus Queue or Topic Subscription went unresponsive. Now, the number of messages inside the queue will start increasing gradually. Depending on the Time to Live value of the Service Bus entity either the number messages to be processed would drastically pile up or the messages would get dead-lettered.
When the application resumes its operation, it might either get overloaded due to the increased number of messages to be processed or fail to process the dead- lettered messages.
Here Serverless360 activities can be used to take necessary actions like:
- purge the active messages to reset the system
- perform dead- letter activities like, Resubmit or Resubmit and Delete as an active message to be processed by the resumed system
This article will cover all capabilities under Serverless360 activities.
Send Messages to Service Bus Entities
Inline Send Message activity can be triggered from the context menu beside the Service Bus entity, Queue or a topic subscription within a Composite Application. The configuration can optionally be saved for further use. The saved activity will be listed under, Activities section of Serverless360.
Send Message Activities can also be defined at Composite Application level, under Activities section. The message body, custom properties and message count, schedule for the activity to run can be configured and saved as a send message activity.
Send Events to Azure Event Hubs
Send Event activity can be created inline or at Activities section to define and send bulk messages to Event Hub associated in a Composite Application. Created activity can be edited to modify the configuration or schedule.
Send messages and send events Activities allow configuring properties:
- Send Batch - the specified number of messages/ events will be spilt across the batches
- Task Count - defines the number parallel instances
- Think time - would define the time gap between every message, in case of more than 1 batch, the time gap between every batch
- Message Count/ Event Data Count - number of messages or events to be sent by this activity
Purge Messages from Service Bus Entities
Inline Purge Message activity can be triggered from the context menu beside the Service Bus entity, Queue or a topic subscription associated within a Composite Application.
Purge message activity offers the following configuration options:
- Choose between active and dead-letter messages of the Entity which should be purged
- Purge the messages enqueued before or at a specific time
- Purge specific number of messages
Service Bus Message Processing Activities
Managing active and dead-lettered messages can be achieved at ease using Serverless360 Service Bus Messaging Activities.
The operations that can be performed on the Service Bus Messages under activities are
1. Resubmit – a copy of the message from the source Queue or Topic Subscription will be sent to the destination Queue or Topic Subscription.
2. Resubmit & Delete – a copy of the message from the source Queue or Topic Subscription will be sent to the destination Queue or Topic Subscription and the message in the source Queue or Topic Subscription will be deleted.
3. Delete – messages in the selected Queue or Topic Subscription will be deleted.
The following configurations will let the action to be performed only on the selected messages.
1. Message count - The number of messages to be processed.
2. Message Enqueued At or Before - Message Enqueued At or Before - Only those messages enqueued at or before the specified time will be processed on enabling the Message Enqueued At or Before option.
3. Dead-Letter reason - In case of dead-letter message processing, it is possible to restrict the actitvity to work only on those messages dead lettered due to a specific dead-letter reason.
Below is the illustration on creating an Activity to process active messages:
Below is the illustration on creating an Activity to process dead-letter messages:
Scheduling the activities
The activities can be scheduled with following options:
- Initiate immediately after save
- Start time (from when the activity should be initiated)
- Selected days on which the activity should be performed
- Select the hours of the days when the Activity should be performed
- Restriction on recurrence either by the number of occurrences completed or by end date.
Follow this illustration to run a previously configured activity