Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经在线程T1中启动了一个 Pulsar Java 使用者,并且我将要处理的消息移交给线程T2。
确认来自T2的消息是否安全?具体来说,调用consumer.acknowledge(messageId)两个线程之间共享的实例可以吗?
consumer.acknowledge(messageId)
是的,java客户端是线程安全的,所以你描述的交互应该没问题。