I understand from documentation that officially AWS SQS does not support "String.Array" which SNS
documentation says it does for attributes. I tried a few tests and I am more unsure about what doc says vs what I am observing. I created two queues Q1
and Q2
that subscribe to my topic topic
.
On Q1
I had set a filter with json as
jsonFilterString={"\"event\"":["\"[event1]\""}
On Q2
, I did not set any filter. Now when I send the SNS with event
key present, both the queues get it as expected. When I remove event
key, only Q2
gets it, which is expected.
The problem happens if I put in this key in the SNS message attribute
"items":"[item1 item2 item3]"
Basically, I create a GoLang slice and then I put as a string in the message attribute. Surprisingly, Q2
gets it perfectly and on the AWS SNS UI, it shows under the Message Attributes
for the message. However, Q1
does not get it.
Is it because of filtering or some other reasons as from docs, I understand that SQS officially does not support String.Array
?