-
Notifications
You must be signed in to change notification settings - Fork 5k
CAMEL-15088: camel-dapr - add Dapr component, invokeService operation #17818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🤖 CI automation will test this PR automatically. 🐫 Apache Camel Committers, please review the following items:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also I suggest to add some more content in the docs file from the start so its not forgotten and we have poor docs for this when you add more stuff.
components/camel-dapr/pom.xml
Outdated
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<firstVersion>4.11.0</firstVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be 4.12
components/camel-dapr/pom.xml
Outdated
<description>Camel Dapr component</description> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these 2 are not needed
components/camel-dapr/pom.xml
Outdated
<dependency> | ||
<groupId>io.dapr</groupId> | ||
<artifactId>dapr-sdk</artifactId> | ||
<version>1.13.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the version should be in parent/pom
components/camel-dapr/pom.xml
Outdated
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-slf4j2-impl</artifactId> | ||
<version>2.21.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the versions from the test dependencies
/** | ||
* Dapr component which interfaces with Dapr Building Blocks. | ||
*/ | ||
@UriEndpoint(firstVersion = "4.11.0", scheme = "dapr", title = "Dapr", syntax = "dapr:operation", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4.12
|
||
@Override | ||
public void process(Exchange exchange) throws Exception { | ||
LOG.info("Processing operation: {}", configurationOptionsProxy.getOperation()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug logging level
components/pom.xml
Outdated
@@ -338,6 +338,7 @@ | |||
<module>camel-jooq</module> | |||
<!-- observability-services requires the availability of other components --> | |||
<module>camel-observability-services</module> | |||
<module>camel-dapr</module> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this up so its in the sorted list with the other components that start with a d
Great work please keep it up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far, do you plan to add other operations?
} | ||
|
||
private void setResponse(Exchange exchange, DaprOperationResponse response) { | ||
exchange.getMessage().setBody(response.getBody(), String.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I would add some guard on the response, to check if it's not null the body.
Checked in the above requested changes. @oscerd yes I do plan to work on other operations as well. |
…keService description and examples
Description
Added the Dapr Component. I have included invoke service producer for now, there are a few other operations as well which we can integrate, would be working on those next.
Target
main
branch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTests
locally from root folder and I have committed all auto-generated changes.