From 5badc7e811233aa52130f1419b6deb51148274fb Mon Sep 17 00:00:00 2001 From: Chris Bartholomew Date: Mon, 1 Apr 2024 17:56:21 -0400 Subject: [PATCH] Make Pulsar producer and schema volatile --- .../pulsar/runner/PulsarTopicConnectionsRuntimeProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langstream-pulsar-runtime/src/main/java/ai/langstream/pulsar/runner/PulsarTopicConnectionsRuntimeProvider.java b/langstream-pulsar-runtime/src/main/java/ai/langstream/pulsar/runner/PulsarTopicConnectionsRuntimeProvider.java index 9ec61ed46..aeb51eeda 100644 --- a/langstream-pulsar-runtime/src/main/java/ai/langstream/pulsar/runner/PulsarTopicConnectionsRuntimeProvider.java +++ b/langstream-pulsar-runtime/src/main/java/ai/langstream/pulsar/runner/PulsarTopicConnectionsRuntimeProvider.java @@ -662,8 +662,8 @@ private class PulsarTopicProducer implements TopicProducer { private final Map configuration; private final AtomicLong totalIn = new AtomicLong(); String topic; - Producer producer; - Schema schema; + volatile Producer producer; + volatile Schema schema; private final Object lock = new Object();