spring-pulsar icon indicating copy to clipboard operation
spring-pulsar copied to clipboard

Fix thread safety of thread-bound transactions in PulsarTemplate

Open Dream95 opened this issue 5 months ago • 0 comments

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.

Dream95 avatar Jun 09 '26 06:06 Dream95