Neil Welsh
07/08/2025, 9:09 AMkapa.ai
07/08/2025, 9:09 AMjava while (consumer.assignment().isEmpty()) { consumer.poll(Duration.ofMillis(100)); // Short poll to trigger partition assignment System.out.println("Waiting for partition assignment..."); } This ensures the consumer is properly assigned to partitions before attempting to read messages. However, this fix is not yet part of the official Airbyte Kafka source connector, so you may need to monitor for updates or consider building a custom connector if you are able to do so [🐛 Source Kafka: no records are read](https://github.com/airbytehq/airbyte/issues/8875). 2. Kafka Source Connector Format Requirements: The Kafka source connector may require a specific JSON format. If the messages in your topic do not match the expected format, Airbyte may not be able to parse them, resulting in empty records being read. Double-check that your Kafka messages are in the correct format (e.g., plain JSON or Avro, as configured in Airbyte) [Kafka Source Setup Guide](https://docs.airbyte.com/integrations/sources/kafka). 3. Consumer Group and Permissions: Ensure that the Airbyte consumer has the correct group ID and sufficient permissions to read from the topic. If the consumer cannot join the group or lacks permissions, it may not be able to consume messages [Kafka - Total records read: 0 (0 bytes)](https://discuss.airbyte.io/t/901). 4. Kafka Version Compatibility: Airbyte requires Kafka cluster version 1.0 or above. Using older versions or incompatible protocol settings may cause issues with message consumption [Kafka Source Setup Guide](https://docs.airbyte.com/integrations/sources/kafka). 5. Check for Known Bugs: There are open issues where users report that Airbyte reads zero records even though data exists in the topic. In some cases, the Airbyte message is created with data, but the destination receives an empty record. This suggests a possible bug in the connector's handling of message data [🐛 Source Kafka: no records are read](https://github.com/airbytehq/airbyte/issues/8875). Summary of Actions: - Ensure your Kafka messages are in the expected format. - Confirm Airbyte's consumer group has the right permissions. - Make sure your Kafka version is supported. - If possible, monitor the Airbyte logs for partition assignment and consumer activity. - Watch for updates or fixes to the Kafka source connector, as this is a known issue. If after these checks the issue persists, you may be encountering the same bug as other users, and it may require a fix from the Airbyte team or a custom patch as described above. You can follow or contribute to the ongoing discussion in the related GitHub issue for updates and potential workarounds [🐛 Source Kafka: no records are read](https://github.com/airbytehq/airbyte/issues/8875).