v2.0.0
auto-detectsend() and readRecords() now auto-detect the format. Simpler API, fewer overloads.
Highlights
- 01
Format auto-detection on publish
KafkaTestPublisher.send(topic, key, value) detects String / Avro GenericRecord / SpecificRecord / JSON DTO from the value type — no more sendJson / sendAvro variants.
Read the guide → - 02
Format auto-detection on read
KafkaTopicReader.readRecords(topic, Class, count) and readSingleRecord(topic, Class) detect deserialisation format from the target class.
Read the guide → - 03
Object batch publishing
sendBatch(topic, List<?>) and sendBatch(topic, Map<String, ?>) accept DTOs, Avro records, and strings.
Full notes
Breaking changes
- Removed sendJson(), sendAvro(), sendJsonBatch() from KafkaTestPublisher. Use send(topic, key, (Object) value) — format is auto-detected from the value type.
- Removed readJsonRecords(), readSingleJsonRecord(), readAvroRecords(), readSingleAvroRecord() from KafkaTopicReader. Use readRecords(topic, Class, count) and readSingleRecord(topic, Class).
- Batch methods now accept Map<String, ?> and List<?> instead of Map<String, String> and List<String>, with auto-detection per element.
- Explicit schemaRegistryUrl parameters have been removed from the public API; the mock schema registry URL is used internally.
- Removed SharedKafkaProperties from public documentation (internal class).
- Removed the configuration-constants docs page and api-reference top-level page (consolidated into the api/ section).
Added
- Auto-detection of serialisation format in KafkaTestPublisher.send() based on value type.
- Auto-detection of deserialisation format in KafkaTopicReader.readRecords() and readSingleRecord().
- Object batch publishing: sendBatch(topic, List<?>) and sendBatch(topic, Map<String, ?>).
- Comprehensive error handling tests and shared-broker convenience overload tests.
- GitLab logo in the docs navbar and footer, linking to the repository.
- v1-to-v2 migration section in the migration guide.
Changed
- Updated all documentation to reflect the simplified v2 API.
Fixed
- Removed broken pagefind search integration; docs now use Nextra's built-in search.