com.solace.spring.cloud.stream.binder.meter.SolaceMeterAccessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-cloud-stream-binder-solace Show documentation
Show all versions of spring-cloud-stream-binder-solace Show documentation
A Spring Cloud Stream Binder implementation using the Solace Java API (JCSMP)
The newest version!
package com.solace.spring.cloud.stream.binder.meter;
import com.solacesystems.jcsmp.XMLMessage;
/**
* Proxy class for the Solace binder to access meter components.
* Always use this instead of directly using meter components in Solace binder code.
* Allows for the Solace binder to still function correctly without micrometer on the classpath.
*/
public class SolaceMeterAccessor {
private final SolaceMessageMeterBinder solaceMessageMeterBinder;
public SolaceMeterAccessor(SolaceMessageMeterBinder solaceMessageMeterBinder) {
this.solaceMessageMeterBinder = solaceMessageMeterBinder;
}
public void recordMessage(String bindingName, XMLMessage message) {
solaceMessageMeterBinder.recordMessage(bindingName, message);
}
}