Just to elaborate some more, my requirement is to route same message from one Kafka topic to different behaviors of different types, is this possible with different consumer groups?
Hi @sfali23 . The example you referenced is to demonstrate Akka Cluster Sharding External Shard Allocation Strategies with Alpakka Kafka. It’s used with Akka Cluster Sharding to efficiently route consumed messages to Akka shard regions by rebalancing them to the same node as the Alpakka Kafka consumer.
It’s unclear to me if you’re using Akka Cluster Sharding or if you’re looking for a different example where you have two instances of an Alpakka Kafka stream consuming from different consumer groups. If it’s the latter, then you need to materialize two separate Akka Streams that have different ConsumerSettings (a different consumer group.id). Then in each stream you can transform and route messages to whatever typed actors you wish.