spring-pulsar
spring-pulsar copied to clipboard
Fix thread safety of thread-bound transactions in PulsarTemplate
PulsarTemplate stored per-thread transactions in a HashMap keyed by Thread. HashMap is not thread-safe, so concurrent use of a shared PulsarTemplate instance could lose transaction bindings.
Replace with ThreadLocal to correctly scope transaction state per thread without shared mutable map access.