Re: Unexpected behavior with Key_Shared (Multiple messages with the same key go to different consumers)

2020-03-26 Thread Hiroyuki Yamada
Hello PengHui, Thank you for the reply and the investigation. Ah, ok, I didn't know it triggers the range split even if consumer threads are created for a short period of time. Sorry, I was mis-understanding the behavior. Thank you again. It helps a lot. Best, Hiroyuki On Fri, Mar 27, 2020 at 1

Re: Unexpected behavior with Key_Shared (Multiple messages with the same key go to different consumers)

2020-03-26 Thread PengHui Li
Hi Hiroyuki, I have run your tests many times. If I start the consumer first and ensure no backlogs for the subscription, then start the producer to publish messages, The result is always correct. For good viewing, I added a TreeSet to store "msg.getKey() + " -> " + consumer.getConsumerName()", fo

Re: Unexpected behavior with Key_Shared (Multiple messages with the same key go to different consumers)

2020-03-25 Thread Hiroyuki Yamada
Hi, Thank you Sijie > > If there is a new consumer joining a subscription, the key distribution > > will be split. So you are expected to see the messages of a key is > > dispatched from one consumer to another consumer. If the consumers of a > > subscription are stable, you will see the messa

Re: Unexpected behavior with Key_Shared (Multiple messages with the same key go to different consumers)

2020-03-25 Thread Sijie Guo
Hi Hiroyuki, > First, multiple messages with the same key go to the same consumer thread as described below. If there is a new consumer joining a subscription, the key distribution will be split. So you are expected to see the messages of a key is dispatched from one consumer to another consumer.

Unexpected behavior with Key_Shared (Multiple messages with the same key go to different consumers)

2020-03-25 Thread Hiroyuki Yamada
Hi, I'm checking Key_Shared feature and faced some unexpected behavior. What happened roughly is, multiple messages with the same key go to different consumers (consumer threads) even though Key_Shared is set. Also, the distribution of messages to consumers is quite skewed. Let me explain what I