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

FilterPolicy not being included on subscription #215

Open
clicktravel-antonrand opened this issue Jan 31, 2020 · 0 comments
Open

FilterPolicy not being included on subscription #215

clicktravel-antonrand opened this issue Jan 31, 2020 · 0 comments

Comments

@clicktravel-antonrand
Copy link

Hello,

I'm currently using goaws:1.1.2 for service testing. I have a test to ensure that only events matching the filter policy end up on the relevant queue I provision, but this test fails because the FilterPolicy isn't being applied.

Given the following SNS client command (pointing to the GoAws docker instance):

    await sns.subscribe({
      Protocol,
      TopicArn,
      Endpoint,
      Attributes: {
        FilterPolicy: '{"subject":["test.TestEvent"]}',
      },
    }).promise();

I receive the following log:

goaws            | {"content":"","endpoint":"http://goaws:4100/queue/service-test-anton-event","level":"info","msg":"Creating Subscription","protocol":"sqs","time":"2020-01-31T15:38:30Z","topicArn":"arn:aws:sns:eu-west-1:000000000000:anton-event","topicName":"anton-event"}

As you can see, FilterPolicy isn't included in the log, but checking the source code - this should be included in the logs.

Can you confirm that the applied FilterPolicy is valid? If so, I think this could be a bug.

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

1 participant