amazon web services - spring-cloud-aws Spring creates message header attribute not supported by SQS -
i'm using spring cloud aws messaging send/receive messages using sqs.
my code looks this:
@springbootapplication @import(messagingconfig.class) public class app { public static void main(string[] args) { springapplication.run(app.class, args); } } @configuration public class messagingconfig { @bean public queuemessagingtemplate queuemessagingtemplate(amazonsqs amazonsqs, resourceidresolver resourceidresolver) { return new queuemessagingtemplate(amazonsqs, resourceidresolver); } }
the sender code (wired via controller):
@component public class sender { @autowired private queuemessagingtemplate queuemessagingtemplate; public void send(mymessage message) { queuemessagingtemplate.convertandsend("testqueue", message); } }
i have application.yaml
file defines aws parameters seem correctly loaded. so, when run application, following warning/error:
message header name 'id' , type 'java.util.uuid' cannot sent message attribute because not supported sqs.
is there i'm doing wrong here, or there issue way spring creates messages sqs?
this appears warning , not affect sending and/or receiving of message. when tested against real sqs queue, both send , receive messages.
however, when using elasticmq on local box replacement real sqs, failing process message. looks issue tool rather spring.