From 4fd35cc0a5f1e8b9fa52494f6cedf166587986c0 Mon Sep 17 00:00:00 2001 From: Croway Date: Mon, 13 Apr 2026 11:16:10 +0200 Subject: [PATCH] chore: fix arangodb and kafka-offsetrepository examples - arangodb: add explicit host/port config required since driver 7.24+ and use BaseDocument instead of String for FIND_DOCUMENT_BY_KEY result - kafka-offsetrepository: add recordMetadata=true since default changed --- .../apache/camel/example/springboot/arangodb/CamelRoute.java | 3 ++- arangodb/src/main/resources/application.properties | 2 ++ .../src/main/resources/spring/camel-context.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arangodb/src/main/java/org/apache/camel/example/springboot/arangodb/CamelRoute.java b/arangodb/src/main/java/org/apache/camel/example/springboot/arangodb/CamelRoute.java index a6933b08..cc6f3f3a 100644 --- a/arangodb/src/main/java/org/apache/camel/example/springboot/arangodb/CamelRoute.java +++ b/arangodb/src/main/java/org/apache/camel/example/springboot/arangodb/CamelRoute.java @@ -16,6 +16,7 @@ */ package org.apache.camel.example.springboot.arangodb; +import com.arangodb.entity.BaseDocument; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.arangodb.ArangoDbConstants; import org.springframework.stereotype.Component; @@ -30,7 +31,7 @@ public void configure() throws Exception { .bean(MyBeanService.class, "createDocument") .to("arangodb:myDatabase?operation=SAVE_DOCUMENT") .bean(MyBeanService.class, "readDocument") - .setHeader(ArangoDbConstants.RESULT_CLASS_TYPE).constant(String.class) + .setHeader(ArangoDbConstants.RESULT_CLASS_TYPE).constant(BaseDocument.class) .to("arangodb:myDatabase?operation=FIND_DOCUMENT_BY_KEY") .log("Received body: ${body}"); } diff --git a/arangodb/src/main/resources/application.properties b/arangodb/src/main/resources/application.properties index b20fe70e..504d5f3e 100644 --- a/arangodb/src/main/resources/application.properties +++ b/arangodb/src/main/resources/application.properties @@ -16,6 +16,8 @@ ## --------------------------------------------------------------------------- camel.main.name=ArangoDB camel.main.run-controller=true +camel.component.arangodb.host=localhost +camel.component.arangodb.port=8529 camel.component.arangodb.documentCollection=myCollection camel.component.arangodb.user=root camel.component.arangodb.password=password diff --git a/kafka-offsetrepository/src/main/resources/spring/camel-context.xml b/kafka-offsetrepository/src/main/resources/spring/camel-context.xml index 6ddc59c5..d52e67f7 100644 --- a/kafka-offsetrepository/src/main/resources/spring/camel-context.xml +++ b/kafka-offsetrepository/src/main/resources/spring/camel-context.xml @@ -57,7 +57,7 @@ This is first producer: ${id} - +