Q1: How does Kafka guarantee message ordering?
Answer: Kafka guarantees message ordering ONLY within a single partition, never across multiple partitions of a topic. To maintain ordering for an entity (e.g., all events for customer X), specify the entity ID as the message key during publishing.
Q2: What causes Kafka Consumer Group Rebalancing, and how do you prevent rebalance storms?
Answer: Rebalancing triggers when a consumer joins/leaves or fails to send heartbeats within `session.timeout.ms`, or when message processing exceeds `max.poll.interval.ms`. Prevent rebalances by keeping poll batches smaller (`max.poll.records`) and processing messages asynchronously.