CAMEL-19417: camel-spring-rabbitmq - convert all message properties by default#10325
CAMEL-19417: camel-spring-rabbitmq - convert all message properties by default#10325davsclaus merged 5 commits intoapache:mainfrom
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Maintainers, please note that first-time contributors require manual approval for the GitHub Actions to run. 🤖 Use the command If necessary Apache Camel Committers may access logs and test results in the job summaries! |
...src/main/java/org/apache/camel/component/springrabbit/DefaultMessagePropertiesConverter.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/camel/component/springrabbit/DefaultMessagePropertiesConverter.java
Outdated
Show resolved
Hide resolved
...-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQConstants.java
Outdated
Show resolved
Hide resolved
...-rabbitmq/src/main/java/org/apache/camel/component/springrabbit/SpringRabbitMQConstants.java
Outdated
Show resolved
Hide resolved
...mq/src/test/java/org/apache/camel/component/springrabbit/integration/RabbitMQProducerIT.java
Outdated
Show resolved
Hide resolved
essobedo
left a comment
There was a problem hiding this comment.
Hi, thx for the PR, here are some remarks/questions
- replace exchange.getMessage() with local variable - use labels in metadata - use Map.of instead of ImmutableMap.Builder
- do not remove headers (header filter strategy already applies)
...src/main/java/org/apache/camel/component/springrabbit/DefaultMessagePropertiesConverter.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/camel/component/springrabbit/DefaultMessagePropertiesConverter.java
Outdated
Show resolved
Hide resolved
- use getHeader(String name, Class<T> type)
essobedo
left a comment
There was a problem hiding this comment.
Sounds much better thx 👍
Components test results:
|
|
🚫 There are (likely) no changes in core core to be tested in this PR |
Components test results:
|
|
🚫 There are (likely) no changes in core core to be tested in this PR |
…y default (apache#10325) * CAMEL-19417: camel-spring-rabbitmq - convert all message properties by default * CAMEL-19417: PR review - replace exchange.getMessage() with local variable - use labels in metadata - use Map.of instead of ImmutableMap.Builder * CAMEL-19417: PR review - do not remove headers (header filter strategy already applies) * CAMEL-19417: PR review - use getHeader(String name, Class<T> type) * CAMEL-19417: Reformat code (cherry picked from commit eedb8c2)
…y default (apache#10325) * CAMEL-19417: camel-spring-rabbitmq - convert all message properties by default * CAMEL-19417: PR review - replace exchange.getMessage() with local variable - use labels in metadata - use Map.of instead of ImmutableMap.Builder * CAMEL-19417: PR review - do not remove headers (header filter strategy already applies) * CAMEL-19417: PR review - use getHeader(String name, Class<T> type) * CAMEL-19417: Reformat code (cherry picked from commit eedb8c2)
…y default (apache#10325) * CAMEL-19417: camel-spring-rabbitmq - convert all message properties by default * CAMEL-19417: PR review - replace exchange.getMessage() with local variable - use labels in metadata - use Map.of instead of ImmutableMap.Builder * CAMEL-19417: PR review - do not remove headers (header filter strategy already applies) * CAMEL-19417: PR review - use getHeader(String name, Class<T> type) * CAMEL-19417: Reformat code (cherry picked from commit eedb8c2)
* CAMEL-19417: camel-spring-rabbitmq - convert all message properties by default (#10325) * CAMEL-19417: camel-spring-rabbitmq - convert all message properties by default * CAMEL-19417: PR review - replace exchange.getMessage() with local variable - use labels in metadata - use Map.of instead of ImmutableMap.Builder * CAMEL-19417: PR review - do not remove headers (header filter strategy already applies) * CAMEL-19417: PR review - use getHeader(String name, Class<T> type) * CAMEL-19417: Reformat code (cherry picked from commit eedb8c2) * CAMEL-19417: Regen (cherry picked from commit 5fee860) * CAMEL-19961 - Auto Generated Build Files --------- Co-authored-by: Steven Dürrenmatt <46787973+sdurrenmatt@users.noreply.github.com> Co-authored-by: tanay.agarwal <tanay.agarwal@volantetech.com>
Description
The goal is to support all the most important RabbitMQ message properties by default (without the need to provide a custom
MessagePropertiesConverter). Those include the removed RabbitMQ component's message properties. Can simplify migration of applications from RabbitMQ to Spring RabbitMQ, which is a necessary step for migrating to Camel 4.I had to modify how content type and timestamp were already handled. I found it better to use new Spring RabbitMQ constants rather than exchange constants. This is a more consistent approach imo. Both are optional and application-specific, like most of the other message properties.
This PR also includes a copy-paste bug fix in the method
appendInputHeader.Target
camel-3.x, whereas Camel 4 uses themainbranch)Tracking
Apache Camel coding standards and style
mvn -Pformat,fastinstall install && mvn -Psourcecheck