public class MessageCountingMonitor extends Object implements MessageMonitor<Message<?>>
MessageMonitor.MonitorCallback
Modifier and Type | Method and Description |
---|---|
static MessageCountingMonitor |
buildMonitor(String meterNamePrefix,
io.micrometer.core.instrument.MeterRegistry meterRegistry)
Creates a message counting monitor
|
static MessageCountingMonitor |
buildMonitor(String meterNamePrefix,
io.micrometer.core.instrument.MeterRegistry meterRegistry,
Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
Creates a message counting monitor
|
MessageMonitor.MonitorCallback |
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 message
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onMessagesIngested
public static MessageCountingMonitor buildMonitor(String meterNamePrefix, io.micrometer.core.instrument.MeterRegistry meterRegistry)
meterNamePrefix
- The prefix for the meter name that will be created in the given meterRegistrymeterRegistry
- The meter registry used to create and register the meterspublic static MessageCountingMonitor buildMonitor(String meterNamePrefix, io.micrometer.core.instrument.MeterRegistry meterRegistry, Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
meterNamePrefix
- The prefix for the meter name that will be created in the given meterRegistrymeterRegistry
- The meter registry used to create and register the meterstagsBuilder
- The function used to construct the list of micrometer Tag
, based on the ingested
messagepublic MessageMonitor.MonitorCallback onMessageIngested(@Nonnull Message<?> message)
MessageMonitor
onMessageIngested
in interface MessageMonitor<Message<?>>
message
- the message to monitorCopyright © 2010–2024. All rights reserved.