Make RabbitStreamTemplate.producer as volatile

This commit is contained in:
Artem Bilan
2024-10-21 17:47:49 -04:00
parent b1c6893e31
commit f150bf531a

View File

@@ -79,8 +79,6 @@ public class RabbitStreamTemplate implements RabbitStreamOperations, Application
private boolean streamConverterSet;
private Producer producer;
private String beanName;
private ProducerCustomizer producerCustomizer = (name, builder) -> { };
@@ -90,10 +88,12 @@ public class RabbitStreamTemplate implements RabbitStreamOperations, Application
@Nullable
private RabbitStreamTemplateObservationConvention observationConvention;
private volatile boolean observationRegistryObtained;
private ObservationRegistry observationRegistry;
private volatile Producer producer;
private volatile boolean observationRegistryObtained;
/**
* Construct an instance with the provided {@link Environment}.
* @param environment the environment.