Skip to content

Conversation

@rlaunch
Copy link

@rlaunch rlaunch commented Jul 22, 2025

This draft PR enhances the existing SNS support by adding fanout support using AWS SNS. Some existing SNS channel methods have been refactored to allow for easier re-use between SNS & SQS services.

As the Channel class was becoming somewhat sprawling, SNS support was added through composition in a subclass and is only initialised upon use of a fanout function.

To avoid breaking changes, 'supports_fanout' has been left as False by default, but can be enabled via transport_options.

TODO:

  • Complete documentation
    • Include all required IAM permissions
    • Explain how cleanup works
  • Add unit tests for new methods and update existing ones

This commit augments the existing SNS support, with fanout support using AWS SNS. Some existing SNS channel methods have been refactored to allow for easier re-use between SNS & SQS services.

As the Channel class was getting a bit sprawling, SNS support was added through composition in a subclass, and is only initialised upon use of a fanout function.

To avoid breaking changes, 'supports_fanout' has been left as False by default, but can be enabled via transport_options.
@auvipy auvipy requested review from auvipy and Copilot July 23, 2025 04:58

This comment was marked as outdated.

@auvipy auvipy requested a review from Copilot July 23, 2025 06:16

This comment was marked as outdated.

auvipy and others added 2 commits July 23, 2025 14:41
@auvipy auvipy requested a review from Copilot July 23, 2025 08:50

This comment was marked as resolved.

rlaunch and others added 5 commits July 24, 2025 09:19
…e their queues, as they subscribed to the SNS topic and received a message without consuming it. SNS topic subscription will only occur when the consumer starts consuming. fixed Flake8 issues.
…e their queues, as they subscribed to the SNS topic and received a message without consuming it. SNS topic subscription will only occur when the consumer starts consuming. fixed Flake8 issues.

Generally refactored SNS fanout classes to reduce scope and improve testability.
@rlaunch
Copy link
Author

rlaunch commented Jul 25, 2025

Updated PR with full tests now

@auvipy auvipy added this to the 5.7.0 milestone Jul 26, 2025
@akosel
Copy link
Contributor

akosel commented Jul 29, 2025

I'm wondering if a formatter like Black ran on this as it seems like there are a lot of changes of single-quotes to double-quotes in the PR. I do think using Black (or something like it) could be a good idea, but to keep this PR focused on the specific fanout problem, can we undo those formatting changes please?

@rlaunch
Copy link
Author

rlaunch commented Jul 29, 2025

Hey @akosel,

Apologies, I have my IDE configured to format with ruff on-save. I've reverted the changes.

Best,
Ryan

@rlaunch
Copy link
Author

rlaunch commented Oct 2, 2025

Hey @auvipy,

Just wanted to check in and see if you had any feedback on this PR, or if there were any outstanding issues I need to address for it to be merged?

Much appreciated,
Ryan

Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please create a new branch on top of main branch on your forks? and then come with a new clean PR? or only keep the relevant changes in this pr?

@rlaunch
Copy link
Author

rlaunch commented Oct 3, 2025

Hi @auvipy,

Sure thing, I'll re-raise a new PR

@rlaunch
Copy link
Author

rlaunch commented Oct 3, 2025

Hey @auvipy,

I've raised PR #2372

Best,
Ryan

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

Successfully merging this pull request may close these issues.

3 participants