Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNS HTTP subscription FilterPolicy don't work #214

Open
rcpires opened this issue Jan 5, 2020 · 1 comment
Open

SNS HTTP subscription FilterPolicy don't work #214

rcpires opened this issue Jan 5, 2020 · 1 comment

Comments

@rcpires
Copy link

rcpires commented Jan 5, 2020

HTTP FilterPolicy option seems not working! A config like that:

Topics:
    - Name: my_topic
      Subscriptions:
        - Protocol: http
          EndPoint: http://backend/my_listener_1
          TopicArn: arn:aws:sns:us-east-1:000000000000:my_topic
          FilterPolicy: '{"event": ["my_event_1"]}'
        - Protocol: http
          EndPoint: http://backend/my_listener_2
          TopicArn: arn:aws:sns:us-east-1:000000000000:my_topic
          FilterPolicy: '{"event": ["other_event", "another_event"]}'

With this config was expected the /my_listener_1 endpoint to receive notifications just from events published with "my_event_1" on message attributes. But all endpoints/subscriptions are receiving notifications for any event published to SNS my_topic (even for events published without MessageAttributes).

Can this be a bug? Or my config is wrong?

Thanks!

@maxholman
Copy link

maxholman commented Apr 16, 2021

For anyone else finding this issue, I fixed this with a couple of lines of code in app/gosns/gosns.go

See: maxholman@1e39f6a

I have absolutely zero golang experience, so I'll just leave this on my fork for reference.

cc: #215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants