Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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}");
}
Expand Down
2 changes: 2 additions & 0 deletions arangodb/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<setBody id="route-setBody-1">
<simple>This is first producer: ${id}</simple>
</setBody>
<to id="_kafka1" uri="kafka:{{producer.topic}}?partitionKey={{partitionValue}}&amp;key=${id}"/>
<to id="_kafka1" uri="kafka:{{producer.topic}}?partitionKey={{partitionValue}}&amp;key=${id}&amp;recordMetadata=true"/>
<log id="route-log-producer-1" message="producer >>> ${body}"/>
<bean id="_bean1" ref="kafkaProcessor"/>
</route>
Expand Down
Loading