Class MessageTimerMonitor

java.lang.Object
org.axonframework.extension.metrics.dropwizard.MessageTimerMonitor
All Implemented Interfaces:
io.dropwizard.metrics5.Metric, io.dropwizard.metrics5.MetricSet, MessageMonitor<Message>

public class MessageTimerMonitor extends Object implements MessageMonitor<Message>, io.dropwizard.metrics5.MetricSet
A MessageMonitor which creates Timer instances for the overall, success, failure and ignored time an ingested Message takes.
Since:
3.0
Author:
Marijn van Zelst
  • Constructor Details

  • Method Details

    • builder

      public static MessageTimerMonitor.Builder builder()
      Instantiate a Builder to be able to create a MessageTimerMonitor.

      The Clock is defaulted to a Clock.defaultClock() and the reservoirFactory defaults to creating a ExponentiallyDecayingReservoir.

      Returns:
      a Builder to be able to create a MessageTimerMonitor
    • onMessageIngested

      public MessageMonitor.MonitorCallback onMessageIngested(Message message)
      Description copied from interface: MessageMonitor
      Takes a message and returns a callback that should be used to inform the message monitor about the result of processing the message
      Specified by:
      onMessageIngested in interface MessageMonitor<Message>
      Parameters:
      message - the message to monitor
      Returns:
      the callback
    • getMetrics

      public Map<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Metric> getMetrics()
      Specified by:
      getMetrics in interface io.dropwizard.metrics5.MetricSet