Using the spring-integration-kafka extention and the following configuration:
<int-kafka:zookeeper-connect id="zookeeperConnect"
zk-connect="#{kafkaConfig['zooKeeperUrl']}" zk-connection-timeout="10000"
zk-session-timeout="10000" zk-sync-time="2000" />
<int-kafka:consumer-context id="consumerContext" consumer-timeout="5000" zookeeper-connect="zookeeperConnect">
<int-kafka:consumer-configurations>
<int-kafka:consumer-configuration
group-id="realtime-services-consumer-grp"
value-decoder="purchaseDecoder"
key-decoder="kafkaReflectionDecoder"
max-messages="5" >
<int-kafka:topic id="purchase" streams="1" />
</int-kafka:consumer-configuration>
<int-kafka:consumer-configuration
group-id="realtime-services-consumer-gw"
value-decoder="eventDecoder"
key-decoder="kafkaReflectionDecoder"
max-messages="10" >
<int-kafka:topic id="event" streams="1" />
</int-kafka:consumer-configuration>
</int-kafka:consumer-configurations>
</int-kafka:consumer-context>
<int-kafka:inbound-channel-adapter
id="kafkaInboundChannelAdapter" kafka-consumer-context-ref="consumerContext"
auto-startup="true" channel="inputFromKafka">
<int:poller fixed-delay="20" time-unit="MILLISECONDS" />
</int-kafka:inbound-channel-adapter>
When for example I comment the first consumer-configuration
I can have 300 event per minute with no issue. But when both are activated. I have a very low throughput. Total of throughput coming from both topic is less than a 50 per minutes.
Anyone know why I have such poor performance when reading from 2 topic? What did I do wrong in the configuration?