AWS SQS sendMessage with message attributes

We try to implement the AWS SQS sendMessage function and include some message attributes, but we facing a problem with that. Everything is working fine if we don’t include those message attributes.
We looked at the SQS docs and API, and the AWS SQS IMP library, and everything looks fine.

This is the code of our SQS params:

// SQS send message parameters
local sendParams = {
  "QueueUrl"                    :  "",
  "MessageGroupId"              : format("%s",theDeviceID),
  "MessageBody"                 : Data,
  "MessageDeduplicationId"      : id,
  "MessageAttribute.1.Name"      : "test",
  "MessageAttribute.1.Value"      : "testmessage",
  "MessageAttribute.1.Type"      : "String",

For testing, I try to send in purpose wrong messages to see the error messages. To start, I send with only message attribute NAME (without the VALUE and TYPE) and got that error message:

The message (user) attribute 'test' must contain a non-empty message attribute value.

(this mean AWS understands what is MessageAttribute.1.Name, and looking for its value)

Next, when I add the value, and after that the type, I got the same error message for both cases:

Unexpected complex element termination

I try to google those problems but I didn’t found anything connected…
I pretty sure I’m missing here something because there is very little implementation in the IMP library, so I don’t think there problem is there OR AWS stops the support for message attributes via their API (which I didn’t find any evidence for it in the web…)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.