rgannu commented on a change in pull request #4241:
URL: https://github.com/apache/camel/pull/4241#discussion_r490193609
##########
File path:
components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConstants.java
##########
@@ -16,42 +16,76 @@
*/
package org.apache.camel.component.rabbitmq;
-public final class RabbitMQConstants {
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+public enum RabbitMQConstants {
// TODO need to change the constant which is start with camel
- public static final String ROUTING_KEY = "rabbitmq.ROUTING_KEY";
- public static final String EXCHANGE_OVERRIDE_NAME =
"rabbitmq.EXCHANGE_OVERRIDE_NAME";
- public static final String EXCHANGE_NAME = "rabbitmq.EXCHANGE_NAME";
- public static final String CONTENT_TYPE = "rabbitmq.CONTENT_TYPE";
- public static final String PRIORITY = "rabbitmq.PRIORITY";
- public static final String DELIVERY_TAG = "rabbitmq.DELIVERY_TAG";
- public static final String REDELIVERY_TAG = "rabbitmq.REDELIVERY_TAG";
- public static final String CORRELATIONID = "rabbitmq.CORRELATIONID";
- public static final String MESSAGE_ID = "rabbitmq.MESSAGE_ID";
- public static final String DELIVERY_MODE = "rabbitmq.DELIVERY_MODE";
- public static final String USERID = "rabbitmq.USERID";
- public static final String CLUSTERID = "rabbitmq.CLUSTERID";
- public static final String REQUEST_TIMEOUT = "rabbitmq.REQUEST_TIMEOUT";
- public static final String REPLY_TO = "rabbitmq.REPLY_TO";
- public static final String CONTENT_ENCODING = "rabbitmq.CONTENT_ENCODING";
- public static final String TYPE = "rabbitmq.TYPE";
- public static final String EXPIRATION = "rabbitmq.EXPIRATION";
- public static final String TIMESTAMP = "rabbitmq.TIMESTAMP";
- public static final String APP_ID = "rabbitmq.APP_ID";
- public static final String REQUEUE = "rabbitmq.REQUEUE";
- public static final String MANDATORY = "rabbitmq.MANDATORY";
- public static final String IMMEDIATE = "rabbitmq.IMMEDIATE";
- public static final String RABBITMQ_DEAD_LETTER_EXCHANGE =
"x-dead-letter-exchange";
- public static final String RABBITMQ_DEAD_LETTER_ROUTING_KEY =
"x-dead-letter-routing-key";
- public static final String RABBITMQ_DIRECT_REPLY_EXCHANGE = "";
- public static final String RABBITMQ_DIRECT_REPLY_ROUTING_KEY =
"amq.rabbitmq.reply-to";
- public static final String RABBITMQ_QUEUE_LENGTH_LIMIT_KEY =
"x-max-length";
- public static final String RABBITMQ_QUEUE_MAX_PRIORITY_KEY =
"x-max-priority";
- public static final String RABBITMQ_QUEUE_MESSAGE_TTL_KEY =
"x-message-ttl";
- public static final String RABBITMQ_QUEUE_TTL_KEY = "x-expires";
- public static final String RABBITMQ_QUEUE_SINGLE_ACTIVE_CONSUMER_KEY =
"x-single-active-consumer";
-
- private RabbitMQConstants() {
- // Constants class
+ ROUTING_KEY("rabbitmq-ROUTING_KEY", "The routing key that will be used
when sending the message"),
Review comment:
> Rabbitmq. Was the original prefix, now it's rabbitmq-.. anyone using
the header explicitly will have his route broken.
I understand completely.
Earlier my PR to support adding property with
`mapData[rabbitmq.CONTENT_TYPE]` was working fine in camel-3.4.0.
I had to submit the PR against the master and this is an enhancement work.
When I did the changes against the master, I started getting problems that
the none of the properties getting their value set due to the changes done in
CAMEL-15394. Now, please let me know how I can fix this. Without the changes to
the prefix so that it doesn't contain the dot (.) character, I couldn't submit
this PR.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]