Class PublishResult

java.lang.Object
org.acemq.amqp.api.PublishResult

public final class PublishResult extends Object
The outcome of one publish, after the broker has confirmed it.
  • Constructor Details

    • PublishResult

      public PublishResult(String messageId, boolean routed, Duration latency)
  • Method Details

    • messageId

      public String messageId()
      Returns:
      the identifier the message was published with
    • routed

      public boolean routed()
      Returns:
      whether the broker had somewhere to route the message
      Implementation Note:
      a confirmed publish that was not routed still means the message is gone. By default the publisher treats this as a failure, because a message nobody receives is almost never what was intended.
    • latency

      public Duration latency()
      Returns:
      how long the broker took to confirm
    • toString

      public String toString()
      Overrides:
      toString in class Object