Class MicrometerOutboxMetrics
java.lang.Object
ch.admin.bit.jeap.messaging.transactionaloutbox.metrics.MicrometerOutboxMetrics
- All Implemented Interfaces:
OutboxMetrics
-
Field Summary
Fields inherited from interface ch.admin.bit.jeap.messaging.transactionaloutbox.outbox.OutboxMetrics
MESSAGE_DELIVERY_TYPE_IMMEDIATE, MESSAGE_DELIVERY_TYPE_SCHEDULED, MESSAGE_DELIVERY_TYPE_TAG, MESSAGE_RESEND_STATUS_RESEND_DISABLED, MESSAGE_RESEND_STATUS_RESEND_ENABLED, MESSAGE_RESEND_STATUS_TAG, MESSAGE_TX_STATUS_COMMITTED, MESSAGE_TX_STATUS_ROLLED_BACK, MESSAGE_TX_STATUS_TAG, MESSAGE_TX_STATUS_UNKNOWN, MESSAGES_FAILED_COUNTER, MESSAGES_POST_COUNTER, MESSAGES_READY_TO_BE_SENT_COUNTER, MESSAGES_READY_TO_BE_SENT_TIMER, MESSAGES_TRANSMIT_TIMER -
Constructor Summary
ConstructorsConstructorDescriptionMicrometerOutboxMetrics(io.micrometer.core.instrument.MeterRegistry meterRegistry, DeferredMessageRepository deferredMessageRepository, FailedMessageRepository failedMessageRepository, ch.admin.bit.jeap.messaging.kafka.metrics.KafkaMessagingMetrics kafkaMessagingMetrics, String applicationName) -
Method Summary
Modifier and TypeMethodDescriptionvoidcountMessagingSend(String bootstrapServers, String topic, String messageType, String messageTypeVersion) Count the actual sending of messages on the messaging system.voidcountTransactionalSend(boolean sendImmediately) Count a send operation on the transactional outbox and tag it with dimensions 'delivery_type' and 'tx_status'.voidUpdate the gauges that reflect outbox metrics derived from persistent storage e.g. the current message relay lag or the current number of failed messages.
-
Constructor Details
-
MicrometerOutboxMetrics
public MicrometerOutboxMetrics(io.micrometer.core.instrument.MeterRegistry meterRegistry, DeferredMessageRepository deferredMessageRepository, FailedMessageRepository failedMessageRepository, ch.admin.bit.jeap.messaging.kafka.metrics.KafkaMessagingMetrics kafkaMessagingMetrics, String applicationName)
-
-
Method Details
-
countTransactionalSend
public void countTransactionalSend(boolean sendImmediately) Description copied from interface:OutboxMetricsCount a send operation on the transactional outbox and tag it with dimensions 'delivery_type' and 'tx_status'.- Specified by:
countTransactionalSendin interfaceOutboxMetrics- Parameters:
sendImmediately-trueif the send operation requested sending immediately after the transaction commit,falseotherwise.
-
updateGauges
public void updateGauges()Description copied from interface:OutboxMetricsUpdate the gauges that reflect outbox metrics derived from persistent storage e.g. the current message relay lag or the current number of failed messages.- Specified by:
updateGaugesin interfaceOutboxMetrics
-
countMessagingSend
public void countMessagingSend(String bootstrapServers, String topic, String messageType, String messageTypeVersion) Description copied from interface:OutboxMetricsCount the actual sending of messages on the messaging system.- Specified by:
countMessagingSendin interfaceOutboxMetrics- Parameters:
bootstrapServers- cluster bootstrap server addresstopic- the topic where the message will be sentmessageType- the type of the messagemessageTypeVersion- the version of the type of the message
-