Class MessageTimerMonitor
java.lang.Object
org.axonframework.extension.metrics.micrometer.MessageTimerMonitor
- All Implemented Interfaces:
MessageMonitor<Message>
A
MessageMonitor which introduces a Timer for the overall timer of all Messages being
ingested, as well as a success, failure and ignored Timer.- Since:
- 4.1
- Author:
- Marijn van Zelst, Ivan Dugalic
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aMessageTimerMonitor.Nested classes/interfaces inherited from interface org.axonframework.messaging.monitoring.MessageMonitor
MessageMonitor.MonitorCallback -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstantiate aMessageTimerMonitorbased on the fields contained in theMessageTimerMonitor.Builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageTimerMonitor.Builderbuilder()Instantiate a Builder to be able to create aMessageTimerMonitor.onMessageIngested(Message message) Takes a message and returns a callback that should be used to inform the message monitor about the result of processing the messageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.messaging.monitoring.MessageMonitor
onMessagesIngested
-
Constructor Details
-
MessageTimerMonitor
Instantiate aMessageTimerMonitorbased on the fields contained in theMessageTimerMonitor.Builder.Will assert that the
meterNamePrefixandMeterRegistryare notnulland will throw anAxonConfigurationExceptionif this is the case.- Parameters:
builder- theMessageTimerMonitor.Builderused to instantiate aMessageTimerMonitorinstance
-
-
Method Details
-
builder
Instantiate a Builder to be able to create aMessageTimerMonitor.The
Clockis defaulted to aClock.SYSTEM, thetagsBuilderto aFunctionreturningTags.empty()and thetimerCustomizationto a no-op. ThemeterNamePrefixandMeterRegistryare hard requirements and as such should be provided.- Returns:
- a Builder to be able to create a
MessageTimerMonitor
-
onMessageIngested
Description copied from interface:MessageMonitorTakes a message and returns a callback that should be used to inform the message monitor about the result of processing the message- Specified by:
onMessageIngestedin interfaceMessageMonitor<Message>- Parameters:
message- the message to monitor- Returns:
- the callback
-