Class PulsarMessageReceiverContext
java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.ReceiverContext<org.apache.pulsar.client.api.Message<?>>
org.springframework.pulsar.observation.PulsarMessageReceiverContext
- All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView
public class PulsarMessageReceiverContext
extends io.micrometer.observation.transport.ReceiverContext<org.apache.pulsar.client.api.Message<?>>
ReceiverContext
for Pulsar messages.- Author:
- Chris Bono
-
Constructor Summary
ConstructorDescriptionPulsarMessageReceiverContext
(org.apache.pulsar.client.api.Message<?> message, String listenerId) -
Method Summary
Modifier and TypeMethodDescriptionThe identifier of the listener receiving the message (typically aPulsarListener
).The name of the topic the message came from.Methods inherited from class io.micrometer.observation.transport.ReceiverContext
getCarrier, getGetter, getKind, getRemoteServiceAddress, getRemoteServiceName, setCarrier, setRemoteServiceAddress, setRemoteServiceName
Methods inherited from class io.micrometer.observation.Observation.Context
addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micrometer.observation.Observation.ContextView
getOrDefault
-
Constructor Details
-
PulsarMessageReceiverContext
public PulsarMessageReceiverContext(org.apache.pulsar.client.api.Message<?> message, String listenerId)
-
-
Method Details
-
getListenerId
The identifier of the listener receiving the message (typically aPulsarListener
).- Returns:
- the identifier of the listener receiving the message
-
getSource
The name of the topic the message came from.- Returns:
- the name of the topic the message came from
-