Interface ClientOutboundContext<T>

  • Type Parameters:
    T - Message type.
    All Known Subinterfaces:
    ClientSendContext<T>

    public interface ClientOutboundContext<T>
    Client's outbound message context.
    • Method Detail

      • type

        OutboundType type()
        Returns the type of this message.
        Returns:
        Type of this message.
      • payload

        T payload()
        Returns the outbound message.
        Returns:
        Message.
      • hasAffinity

        boolean hasAffinity()
        Returns true if the messaging operation has an affinity key (see affinityKey()).
        Returns:
        true if the messaging operation has an affinity key.
      • affinity

        int affinity()
        Returns the hash code of affinity key or a synthetically generated value if affinity key was not specified for the messaging operation.
        Returns:
        Hash code of affinity key.
      • affinityKey

        Object affinityKey()
        Returns the affinity key of the messaging operation or null if the affinity key wasn't specified.
        Returns:
        Affinity key or null.
      • prevFailure

        Optional<FailedAttempt> prevFailure()
        Returns the previous failure in case if this is a retry attempt.
        Returns:
        Failure of a previous attempt.