You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gaganbajaj5 (via GitHub)" <gi...@apache.org> on 2024/01/29 16:14:31 UTC
[I] Reading headers from SQS message [camel-kafka-connector]
gaganbajaj5 opened a new issue, #1595:
URL: https://github.com/apache/camel-kafka-connector/issues/1595
Hi,
We have a AWS2SQS Kafka source connector (V0.11.0) running in Kafka connect with connector.class = org.apache.camel.kafkaconnector.aws2sqs.CamelAws2sqsSourceConnector
By default, the connector reads the Body of the message and pushes it into our Kafka topic. But we have a new requirement which needs us to push headers (MessageAttributes) from SQS into the Kafka topic. Unfortunately, i am not able to find anything in the documentation or the example specified anywhere, would you be able to guide how can I achieve this?
I was thinking if there is a way to use custom transforms, but is there a better way library provides out of the box with connector?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reading headers from SQS message [camel-kafka-connector]
Posted by "oscerd (via GitHub) via commits" <co...@camel.apache.org>.
oscerd closed issue #1595: Reading headers from SQS message
URL: https://github.com/apache/camel-kafka-connector/issues/1595
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Reading headers from SQS message [camel-kafka-connector]
Posted by "oscerd (via GitHub) via commits" <co...@camel.apache.org>.
oscerd commented on issue #1595:
URL: https://github.com/apache/camel-kafka-connector/issues/1595#issuecomment-6632131121
Closing this as answered, with apologies that nobody replied at the time. The 0.11 `CamelAws2sqsSourceConnector` no longer exists; in 4.22.x the equivalent is `camel-aws-sqs-source-kafka-connector`, and the SQS consumer has to request the message attributes when it receives messages, which you can enable with the Camel component option `camel.component.aws2-sqs.messageAttributeNames` (a comma-separated list of names, or `All`). The consumer then sets each String or Number attribute as a Camel header, and the connector copies it into a Kafka record header named `CamelHeader.<attribute name>` (header mapping is on by default, `camel.map.headers=true`), so no custom transform is needed. If that does not work on 4.22.x, please open a new issue with your config; for further usage questions users@camel.apache.org and https://camel.zulipchat.com are the best places.
---
_Claude Code on behalf of Andrea Cosentino_
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org