sqs-consumer
sqs-consumer copied to clipboard
Message Attributes not working
Question Hi I am using sqs-consumer to listen to my SQS queue subscribed to a SNS topic. Its listening to all the messages. No issues there. I have put some filters in SNS subscription (screenshot 1). Also configured it in my code (screenshot 2). I tried all permutation combinations of setting it only to attributeNames field, setting it only to messageAttributeNames filed, setting it to both, but nothing is working, I am receiving all messages, no matter which filter it has (screenshot 3)
Screenshots
SNS filters (1)


Am I doing anything wrong here?
I have the same question, is it possible to have a consumer for each specific attribute?
From what I can tell, this is not possible. I think what you might need to do is some how determine if it's a message that you want to process and if not, "fail" the message so that it gets returned to the queue. It would be nice if we had some kind of pre-processing event that you could simply return true (process message) or false (do not process message and put message back into queue).
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.