public class EventProcessorLatencyMonitor extends Object implements org.axonframework.monitoring.MessageMonitor<org.axonframework.eventhandling.EventMessage<?>>, com.codahale.metrics.MetricSet
MessageMonitor implementation dedicated to EventMessages.
This monitor defines the latency between the EventMessage.getTimestamp() and the Clock.instant().
Doing so, it depicts the latency from when an event was published compared to when an
EventProcessor processes the event to clarify how far behind an
EventProcessor is.
Do note that a replay (as triggered through StreamingEventProcessor.resetTokens(), for example) will cause
this metric to bump up due to the processor handling old events.
| Constructor and Description |
|---|
EventProcessorLatencyMonitor()
Construct an
EventProcessorLatencyMonitor using a Clock.systemUTC(). |
EventProcessorLatencyMonitor(Clock clock)
Construct an
EventProcessorLatencyMonitor using the given clock. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,com.codahale.metrics.Metric> |
getMetrics() |
org.axonframework.monitoring.MessageMonitor.MonitorCallback |
onMessageIngested(org.axonframework.eventhandling.EventMessage<?> message) |
public EventProcessorLatencyMonitor()
EventProcessorLatencyMonitor using a Clock.systemUTC().public EventProcessorLatencyMonitor(Clock clock)
EventProcessorLatencyMonitor using the given clock.clock - defines the Clock used by this MessageMonitor implementationpublic org.axonframework.monitoring.MessageMonitor.MonitorCallback onMessageIngested(@Nonnull org.axonframework.eventhandling.EventMessage<?> message)
onMessageIngested in interface org.axonframework.monitoring.MessageMonitor<org.axonframework.eventhandling.EventMessage<?>>Copyright © 2010–2023. All rights reserved.