Interface TransactionOutboxListener


  • public interface TransactionOutboxListener
    A listener for events fired by TransactionOutbox.
    • Method Detail

      • success

        default void success​(TransactionOutboxEntry entry)
        Fired when a transaction outbox task is successfully completed and recorded as such in the database such that it will not be re-attempted. Note that:
        • TransactionOutbox uses "at least once" semantics, so the actual processing of a task may complete any number of times before this event is fired.
        • This event is not guaranteed to fire in the event of a JVM failure or power loss. It is fired after the commit to the database removing the completed task and all bets are off after this point.
        Parameters:
        entry - The outbox entry completed.
      • failure

        default void failure​(TransactionOutboxEntry entry,
                             Throwable cause)
        Fired when a transaction outbox task fails. This may occur multiple times until the maximum number of retries, at which point this will be fired and then blacklisted(TransactionOutboxEntry, Throwable). This event is not guaranteed to fire in the event of a JVM failure or power loss. It is fired after the commit to the database marking the task as failed.
        Parameters:
        entry - The outbox entry failed.
        cause - The cause of the most recent failure.
      • blacklisted

        default void blacklisted​(TransactionOutboxEntry entry,
                                 Throwable cause)
        Fired when a transaction outbox task has passed the maximum number of retries and has been blacklisted. This event is not guaranteed to fire in the event of a JVM failure or power loss. It is fired after the commit to the database marking the task as blacklisted.
        Parameters:
        entry - The outbox entry blacklisted.
        cause - The cause of the most recent failure.
      • andThen

        default TransactionOutboxListener andThen​(TransactionOutboxListener other)
        Chains this listener with another and returns the result.
        Parameters:
        other - The other listener. It will always be called after this one.
        Returns:
        The combined listener.