Croway opened a new pull request, #200: URL: https://github.com/apache/camel-spring-boot-examples/pull/200
## Summary The `kafka-avro` example was broken in several ways: - `CachedSchemaRegistryClient(schemas, Integer.MAX_VALUE)` in both the custom serializer and deserializer caused an OOM crash on startup, regardless of whether a schema registry was reachable. - Real Avro object creation was commented out, so the example actually sent a plain `String`, not Avro. - The `avro-maven-plugin` codegen was commented out in the pom. - The Confluent schema registry URL was hardcoded. - The README documented two contradictory setup paths (manual Confluent vs. `camel infra run kafka`) - neither worked alone, since infra kafka has no schema registry. This rewrites the example to use Camel's native `AvroDataFormat` instead of Confluent's schema-registry-backed serializers. This needs only a plain Kafka broker (no schema registry at all), which removes the OOM-causing code outright and lets the README document a single, working setup path via `camel infra run kafka`. Also fixes two latent bugs found while verifying end-to-end: - `KafkaConstants.KAFKA_RECORD_META` needed `recordMetadata=true` on the producer endpoint to actually populate (was silently `null`), so the previously-unwired `KafkaAvroProcessor` is now wired into the producer route. - `consumer.group` was defined in `application.properties` but never referenced in the consumer endpoint URI. ## Test plan - [x] `mvn clean package` (checkstyle/RAT included) passes - [x] Started a broker with `camel infra run kafka`, ran `mvn spring-boot:run`, and confirmed the producer builds and sends real `Employee` Avro records, the consumer unmarshals and logs them back, and record metadata logging works with no errors/OOM. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HseDjsECuZhsCXxxioiD1k -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
