Anybody knows how to receive SQS message attributes using the Camel DSL in java? I'm getting the following error:
"Failed to create route payee route: Route(batch route)[[From[aws-sqs://myqueue?amazonSQSEndpoint=... because of Failed to resolve endpoint: aws-sqs://myqueue?amazonSQSEndpoint=sqs.us-west-1.amazonaws.com&accessKey=*****&secretKey=****************&maxMessagesPerPoll=1&messageAttributeNames=%5BuserID%5 due to: Could not find a suitable setter for property: messageAttributeNames as there isn't a setter method with same type: java.lang.String nor type conversion possible: No type converter available to convert from type: java.lang.String to the required type: java.util.Collection with value [userID] "
Please find my code
StringBuilder QueueURI = new StringBuilder();
QueueURI(PropertyUtils.AWS_SQS)
.append(propertyUtils.queueName)
.append(PropertyUtils.AMAZON_SQS_REGION)
.append(propertyUtils.sqsRegion);
QueueURI(PropertyUtils.AWS_ACCESS_KEY).append(
propertyUtils.awsAccessKey);
QueueURI(PropertyUtils.AWS_SECRET_KEY).append(
propertyUtils.awsSecretKey);
QueueURI(PropertyUtils.MAX_MESSAGES_PER_POLL_1);
QueueURI("&messageAttributeNames=");
Collection<String> collection = new ArrayList<String>();
collection.add("userID");
//aws-sqs://myqueue?amazonSQSEndpoint=sqs.us-west-1.amazonaws.com&accessKey=*****&secretKey=****************&maxMessagesPerPoll=1&messageAttributeNames=[userID]
from(QueueURI.ToString() + collection)
.routeId("batch route")
.process(userValidator);