Currently there are no partitions based subscription inside topic.So when you subscribe to both topics your consumer will get data from each partitions in these two topics, i dont think you would be missing anything.
On Fri, Oct 23, 2015 at 11:35 AM, Fajar Maulana Firdaus <faja...@gmail.com> wrote: > I am using kafka to implement event sourcing. Based on a threat in > http://search-hadoop.com/kafka, I created sepparate topic for my > events, e.g. UserCreatedEvent and UserUpdateEmailEvent. Both events > are using userId as the message key. However assuming each topic has > several partition, how to setup the consumer? > > My consumer is listening to both events / topics. But I am not sure if > my consumer didn't miss the event for user A from both topics because > in topic UserCreated, key userA can end up in partition 1 but on > UserUpdateEmail topic, key userA can end up in other partition. > > Or does it mean I need to make consumer to listen to all partition? > But this approach is not scalable. > > Thank you, > Fajar >