Q:

All the consumers from consumer group receive message

I have written a spring cloud stream app to receive messages from Kafka topic.  
I am trying to setup consumer group, so that when I scale my app only one of the app instances receive message from Kafka topic.  
Following is my application.yml

spring:
  cloud:
    stream:
      bindings:
        orderTopic:
          group: orderGroup
          destination: orderTopic
      kafka:
        binder:
          brokers: 192.168.61.21
          defaultBrokerPort: 9092
          zkNodes: 192.168.61.21
          defaultZkPort: 2181

I have deployed the app to cloud foundry (pcfdev) and set the instance count for the app to 2.  When I send an order to orderTopic topic, I am expecting that only one of 2 app instances receive the order, However, both the app instances receive same order as seen below

    2016-05-10T16:33:46.42-0600 [APP/0]      OUT Order Number 23 received. 
    2016-05-10T16:33:47.42-0600 [APP/1]      OUT Order Number 24 received. 
    2016-05-10T16:33:47.42-0600 [APP/0]      OUT Order Number 24 received. 
    2016-05-10T16:33:48.42-0600 [APP/1]      OUT Order Number 25 received. 
    2016-05-10T16:33:48.42-0600 [APP/0]      OUT Order Number 25 received. 
    2016-05-10T16:33:49.43-0600 [APP/1]      OUT Order Number 26 received. 
    2016-05-10T16:33:49.43-0600 [APP/0]      OUT Order Number 26 received. 

Can you please help

A:

Here's a reference to what you need to do: http://docs.spring.io/spring-cloud-stream/docs/current-SNAPSHOT/reference/htmlsingle/#_instance_index_and_instance_count
The Kafka binder needs that information in order assign partitions correctly to instances.  
As part of the Spring Cloud Stream 1.1.0.M1 effort we will upgrade to the 0.9 Kafka client and priovide the ability to (re)partition automatically as new instances are added.