Exclusive独占
如果“旧的”生产者经历了broker发生了网络分区,则旧的生产者会被驱逐,并且一个“新的”生产者被选中成为下一个Exclusive类型的生产者。
上面是文档上的介绍,请问这个新的生产者从哪里来,在spring boot项目启动时就不允许有2个生产者关联同一个topic,会发生启动异常,那么 这个新的生产者从哪里来?
Exclusive独占
如果“旧的”生产者经历了broker发生了网络分区,则旧的生产者会被驱逐,并且一个“新的”生产者被选中成为下一个Exclusive类型的生产者。
上面是文档上的介绍,请问这个新的生产者从哪里来,在spring boot项目启动时就不允许有2个生产者关联同一个topic,会发生启动异常,那么 这个新的生产者从哪里来?
WaitForExclusive 方式,请问咋们这个是什么场景需要这样设置呢?
/**
* The type of access to the topic that the producer requires.
*/
public enum ProducerAccessMode {
/**
* By default multiple producers can publish on a topic.
*/
Shared,
/**
* Require exclusive access for producer. Fail immediately if there's
* already a producer connected.
*/
Exclusive,
/**
* Producer creation is pending until it can acquire exclusive access.
*/
WaitForExclusive,
}
感谢。我的疑问点就是这个新的生产者从哪里来,我的理解是不是需要人工启动新的spring boot项目来创建新的生产者?
自测试的结果,就是必须要手动启动一个新的生产者。