-
Notifications
You must be signed in to change notification settings - Fork 101
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
How to set Map property via the kafka connector configuration #323
Comments
Oh yeah that is a good question that we could look at making easier to configure. So you can use
style to define the map bean with the name xxx So it should be something like
|
Also we should update the docs about this. The camel kafka connector runs via camel-main that has a set of options (however many of listed currently would not be so relevant for camel kafka connector) - but its a place in the docs where we should document the camel.beans style |
Created a ticket |
Hi @davsclaus Still the initial problem for me exists. My proposal is to give support there to add additional headers, so that sink connector implementation classes (like CamelRabbitMQSinkTask) can if they want add the additional headers. This would be quite useful for any sink connectors which want to add additional headers on the fly via sink connector configuration itself. I will submit a PR for this. Please review the same and give your valuable comments. |
Hi @rgannu That sounds good |
apache#323 Added support for additional headers and properties support The additional headers will be added on top of the existing headers from the message. The properties added are only basic AMQP properties as defined in the {@link com.rabbitmq.client.AMQP.BasicProperties.Builder}. When the message contains already these properties then will be considered and these additional properties will be ignored.
Created ticket: https://issues.apache.org/jira/projects/CAMEL/issues/CAMEL-15496 |
I do not think that is something rleated to camel plain, there wasn't any need of adding an issue in the JIRA for this, this issue was enough. |
Ok, now I'm getting what you're doing. You need to modify the camel component to have new options added to the connector. Also since this is new stuff, this would be done only on camel 3.6.0. Anyway, that commit is just a modification of properties, the under the hood component won't do anything related to those options. |
Also, at the next build, the connector configuration will be overriden. |
apache#323 Added support for additional headers and properties support The additional headers will be added on top of the existing headers from the message. The properties added are only basic AMQP properties as defined in the {@link com.rabbitmq.client.AMQP.BasicProperties.Builder}. When the message contains already these properties then will be considered and these additional properties will be ignored.
Just for checking, is it already done? Can we close this? |
Just for confirming here so that others who step into this problem can work. Things to do for passing map data via connector JSON configuration.
Works like a gem. Thanks @oscerd for suggesting the camel-archetype. |
The headers are not visible in RabbitMQ with the next configuration.
Can i give the headers value in a string? |
This is definitely not a bug but I do not know how to set map via properties/json in the kafka sink connector configuration.
https://camel.apache.org/camel-kafka-connector/latest/connectors/camel-rabbitmq-kafka-sink-connector.html
Can you please explain how to set the
camel.sink.endpoint.clientProperties
?The error says I need to set as a Bean. In that case can you please explain how to do ?
I get the following error while starting the sink connector configuration.
The text was updated successfully, but these errors were encountered: