1
votes

i want to send some message attributes to AWS sqs along with message body using camel routes. But only message body is getting sent. I am unable to send message attributes to SQS.Below is my route

from("direct:send-to-sqs")
                .setBody(simple("${exchangeProperty.ENTITY_JSON}"))
                .setProperty("systemName",simple("FINANCE"))
                .log("body which is to be send to sqs is ${body}")
                .to("aws-sqs://{my sqs url}:QueueForPOC?" +
                        "amazonSQSClient=#sqsClient&attributeNames=#systemName")
                .log("entity has been sent to SQS.");

Can anyone please give me some clue and help??

1
Try to use setHeader instead of setPropertyGreenev
@Greenev Thank you so much bro...it worked for me :-)Purushottam kumar

1 Answers

1
votes

Try to use setHeader instead of setProperty