All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.solace.spring.cloud.stream.binder.tracing.TracingProxy Maven / Gradle / Ivy

The newest version!
package com.solace.spring.cloud.stream.binder.tracing;

import com.solacesystems.jcsmp.BytesXMLMessage;
import com.solacesystems.jcsmp.SDTMap;
import com.solacesystems.jcsmp.XMLMessage;
import lombok.RequiredArgsConstructor;
import org.springframework.messaging.Message;

import java.util.function.Consumer;

/**
 * 

Proxy class for the Solace binder to access tracing components. * Always use this instead of directly using tracing components in Solace binder code.

*

Allows for the Solace binder to still function correctly without micrometer on the classpath.

*/ @RequiredArgsConstructor public class TracingProxy { public static final String TRACING_HEADER_KEY = "TRACING_HEADER_KEY"; private final TracingImpl tracingImpl; public SDTMap getTracingHeader() { return tracingImpl.getTracingHeader(); } public Consumer> wrapInTracingContext(SDTMap tracingHeader, Consumer> messageConsumer) { return this.tracingImpl.wrapInTracingContext(tracingHeader, messageConsumer); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy