Class EsbStats

java.lang.Object
com.kingsrook.qqq.esb.stats.EsbStats

public class EsbStats extends Object
In-memory ESB counters for this node (spec section 7): nothing is stored, and counts start over when the app restarts. Destinations are counted by their QQQ destination name, and triggers by their trigger name (processName.destinationName), in separate maps. Counting never throws: a null name is ignored, so observability can't break a publish or a run. Safe to call from any thread.
  • Method Details

    • getInstance

      public static EsbStats getInstance()
      The singleton.
    • published

      public void published(String destinationName)
      A message was sent to the destination.
    • publishFailed

      public void publishFailed(String destinationName, Exception exception)
      A message could not be sent to the destination.
    • consumed

      public void consumed(String triggerName)
      The trigger received a message.
    • succeeded

      public void succeeded(String triggerName, long ms)
      The trigger's run succeeded, taking ms milliseconds.
    • failed

      public void failed(String triggerName, Exception exception)
      The trigger's run failed.
    • retried

      public void retried(String triggerName)
      The trigger's failed message will be redelivered for another attempt.
    • deadLettered

      public void deadLettered(String triggerName)
      The trigger's message used its last attempt, and was dead-lettered (or discarded).
    • inFlight

      public void inFlight(String triggerName, int delta)
      Change the number of messages the trigger is processing right now (+1 when a run starts, -1 when it ends).
    • destination

      public EsbCounterSnapshot destination(String destinationName)
      A snapshot of the destination's counters (all zero if it has none).
    • trigger

      public EsbCounterSnapshot trigger(String triggerName)
      A snapshot of the trigger's counters (all zero if it has none).
    • reset

      public void reset()
      Clear all counters (used by tests).