Interface ObservationCollector
- All Known Implementing Classes:
NoOpObservationCollector
public interface ObservationCollector
API to instrument operations in the AMQP client. The supported operations are publishing,
asynchronous delivery, and synchronous delivery (
basic.get).
Implementations can gather information and send it to tracing backends. This allows e.g. following the processing steps of a given message through different systems.
This is considered an SPI and is susceptible to change at any time.
- Since:
- 5.19.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceUnderlyingbasic.getcall.static interfaceConnection information.static interfaceUnderlying publishing call. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbasicConsume(String queue, String consumerTag, Consumer consumer) Decorate consumer registration.basicGet(ObservationCollector.BasicGetCall call, String queue) Decorate message polling withbasic.get.voidpublish(ObservationCollector.PublishCall call, AMQP.Basic.Publish publish, AMQP.BasicProperties properties, byte[] body, ObservationCollector.ConnectionInfo connectionInfo) Decorate message publishing.
-
Field Details
-
NO_OP
-
-
Method Details
-
publish
void publish(ObservationCollector.PublishCall call, AMQP.Basic.Publish publish, AMQP.BasicProperties properties, byte[] body, ObservationCollector.ConnectionInfo connectionInfo) throws IOException Decorate message publishing.Implementations are expected to call
to make sure the message is actually sent.invalid reference
PublishCall#publish(PublishCall, AMQP.Basic.Publish, AMQP.BasicProperties, byte[], ConnectionInfo)- Parameters:
call-publish-properties-body-connectionInfo-- Throws:
IOException
-
basicConsume
-
basicGet
Decorate message polling withbasic.get.Implementations are expected to
and return the same result.invalid reference
BasicGetCall#basicGet(BasicGetCall, String)- Parameters:
call-queue-- Returns:
-