DeliveryMonitor

public class DeliveryMonitor

A controlling monitor of a Inbox Delivery process.

In some cases when a funnel-like Entity (e.g. some projection of a business report subscribed to half of the domain events) has a lot of messages in its Inbox, the delivery process may be slowed down for other targets in the same shard, while all the messages are being dispatched the "busy" Entity. Depending on the number of messages to deliver, it may take a lot of time.

Environments such as Google AppEngine Standard imply restrictions on the duration of the request processing. Therefore, it may be necessary to stop the message delivery for this shard at some point, and re-schedule the shard processing again by sending another request and thus resetting the processing clock.

Constructors

Link copied to clipboard
public void DeliveryMonitor()

Functions

Link copied to clipboard
public void onDeliveryCompleted(DeliveryStats stats)
Called once some delivery process has completed and the corresponding shard has been released.
Link copied to clipboard
public void onDeliveryStarted(ShardIndex index)
Link copied to clipboard
A callback invoked if the signal transmitted via given message was handled by the respective receptor with failure.
Link copied to clipboard
Called if Delivery could not pick up a shard because it was already picked up by another worker.
Link copied to clipboard
Called if an Exception occurred when the Delivery attempted to pick up a shard.
Link copied to clipboard
public boolean shouldContinueAfter(DeliveryStage stage)
Determines if the delivery execution should be continued after the given stage is completed.