多个 JMS 消费者对同一个 MQ JMS 队列是否保证负载平衡?
Does Multiple JMS Consumers to same MQ JMS Queue guarantees Load Balancing?
我们有一个 IBM MQ JMS 队列,希望将数据分发给多个消费者以实现负载平衡。那么如果我们编写两个 JMS 客户端来使用同一个 JMS 队列会发生什么?消息是否会在两个消费者之间平均分配,因为一个消费者会在读取数据后删除数据?是否存在数据重复的可能性,例如如果两个消费者在竞争条件下读取相同的消息?
我下面的评论是基于破坏性获取而不是浏览获取。
So if we write two JMS Clients to consume from same JMS queue what
will happen?
他们都会消费消息。
Will Messages be equally distributed across both consumers since one
consumer will delete the data after it is read?
没有。 "hot" 消费者将收到下一条可用消息,假设它是 "getting" 在下一条消息到达之前又是一条消息。
Is there a possibility for data duplication, like if the same message
is read by both consumers in a race condition?
如果您正在执行破坏性获取(默认),则不会。
我们有一个 IBM MQ JMS 队列,希望将数据分发给多个消费者以实现负载平衡。那么如果我们编写两个 JMS 客户端来使用同一个 JMS 队列会发生什么?消息是否会在两个消费者之间平均分配,因为一个消费者会在读取数据后删除数据?是否存在数据重复的可能性,例如如果两个消费者在竞争条件下读取相同的消息?
我下面的评论是基于破坏性获取而不是浏览获取。
So if we write two JMS Clients to consume from same JMS queue what will happen?
他们都会消费消息。
Will Messages be equally distributed across both consumers since one consumer will delete the data after it is read?
没有。 "hot" 消费者将收到下一条可用消息,假设它是 "getting" 在下一条消息到达之前又是一条消息。
Is there a possibility for data duplication, like if the same message is read by both consumers in a race condition?
如果您正在执行破坏性获取(默认),则不会。