Skip to content

Outbox: Additional latency due to outbox dispatching based on send/received control message #145

Description

@ramonsmits

When the transaction session completed the messages are not immediately dispatched. The control messages that is already in flight will be processed and retrieve the outbox record and only then starts dispatching and causes unneeded latency.

Poll based transports

This latency is very noticeable in a poll based transport like SQL transport. Especially if the endpoint is idle and the queue peek interval has the default or higher value. In that case the latency can be observed to double in length. Such "pick up" latency due to polling does not exist for push-based transports.

Queue backlog

If the control message is sent to a queue that has a backlog of messages then dispatching is delayed until the control messages gets processed. If the backlog presents a queue time of 5 seconds the messages that were sent in the API will have a +5 second delay.

Monitor the critical time metric to know if a queue backlog is causing the observed dispatch/delivery latency.

Busy storage

As the control message is already dispatched it can happen that the data is not yet available for reading when the control message is processed. Processing fails and the control message is retried and resulting in additional latency.

This can be mitigated by running the outbox/business data transaction in a pessimistic locking configuration.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions