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
CAMEL-14242: Fix binding parameters with arg.- is not possible when using endpointdsl and RabbitMQ #3385
CAMEL-14242: Fix binding parameters with arg.- is not possible when using endpointdsl and RabbitMQ #3385
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,6 +185,8 @@ protected RabbitMQEndpoint createEndpoint(String uri, | |
} | ||
} | ||
|
||
@SuppressWarnings("unchecked") | ||
Map<String, Object> args = resolveAndRemoveReferenceParameter(params, "args", Map.class, getArgs()); | ||
@SuppressWarnings("unchecked") | ||
Map<String, Object> clientProperties = resolveAndRemoveReferenceParameter(params, "clientProperties", Map.class, getClientProperties()); | ||
TrustManager trustManager = resolveAndRemoveReferenceParameter(params, "trustManager", TrustManager.class, getTrustManager()); | ||
|
@@ -202,6 +204,7 @@ protected RabbitMQEndpoint createEndpoint(String uri, | |
endpoint.setAddresses(getAddresses()); | ||
endpoint.setThreadPoolSize(getThreadPoolSize()); | ||
endpoint.setExchangeName(exchangeName); | ||
endpoint.setArgs(args); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, I think this is not needed, as this being handled by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is all the point params parameter is always an empty map where args is setting using query parameters is my PR there is something wrong i don't know where i think we have to cleanup this component There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean? What are you trying to fix exactly here? Because I feel we are mixing things up here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I trying to first getting args argument when it passed as query parameters lets just fix this for beginning There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I thought if you pass it like this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean ? i really didn't understand There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The case is simple how i suppose to translate this weird way There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this PR, I suggested to remove some lines from the code. This line where we are commenting now and here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But this is the main point if your remove this line i'll get an empty map There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe if you can try this and i think you'll see what i'm trying to solve |
||
endpoint.setClientProperties(clientProperties); | ||
endpoint.setSslProtocol(getSslProtocol()); | ||
endpoint.setTrustManager(trustManager); | ||
|
@@ -249,9 +252,9 @@ protected RabbitMQEndpoint createEndpoint(String uri, | |
} | ||
|
||
Map<String, Object> localArgs = new HashMap<>(); | ||
if (getArgs() != null) { | ||
if (endpoint.getArgs() != null) { | ||
// copy over the component configured args | ||
localArgs.putAll(getArgs()); | ||
localArgs.putAll(endpoint.getArgs()); | ||
} | ||
localArgs.putAll(PropertiesHelper.extractProperties(params, ARG_PREFIX)); | ||
endpoint.setArgs(localArgs); | ||
|
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.
I think this is not needed, under by
setProperties
is doing the job to resolve the args paramThere 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.
Same as my next comment