Added
A telemetry service publishes keyed device records to a topic with 24 partitions. A downstream application must preserve order for each device, scale processing across consumer instances, and avoid coordinating application-level locks. The team can tolerate records for different devices being processed concurrently, but it cannot accept reordering of one device's records. Producers currently choose a partition randomly. Which two changes best meet the requirements? (Choose two.)
Using the device identifier as the key gives records for that device a stable partition assignment, and a shared group.id lets Kafka distribute partitions among the group's consumers. Kafka preserves order within a partition, not across partitions. Distinct group IDs cause each consumer group to receive its own full subscription rather than share work. Replication improves fault tolerance but does not establish cross-partition ordering. Changing partitions for each request would undermine per-device ordering.