Package com.rabbitmq.client.observation
Interface ObservationCollector
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
publish(PublishCall, AMQP.Basic.Publish, AMQP.BasicProperties, byte[], ConnectionInfo)to make sure the message is actually sent.- Parameters:
call-publish-properties-body-connectionInfo-- Throws:
IOException
-
basicConsume
Decorate consumer registration.Implementations are expected to decorate the appropriate
Consumercallbacks. The originalConsumerbehavior should not be changed though.- Parameters:
queue-consumerTag-consumer-- Returns:
-
basicGet
Decorate message polling withbasic.get.Implementations are expected to
basicGet(BasicGetCall, String)and return the same result.- Parameters:
call-queue-- Returns:
-