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

Consider adding autostart property to SqsOptions.Listener #1188

Open
akefirad opened this issue Aug 16, 2024 · 3 comments
Open

Consider adding autostart property to SqsOptions.Listener #1188

akefirad opened this issue Aug 16, 2024 · 3 comments
Labels
component: sqs SQS integration related issue status: waiting-for-feedback Waiting for feedback from issuer type: enhancement Smaller enhancement in existing integration

Comments

@akefirad
Copy link
Contributor

Type: Feature

Is your feature request related to a problem? Please describe.
There are cases in which we might wanna have SQS integration (e.g. publishing messages) but disable SQS listeners. But currently there's no easy way to do this via configuration properties.

Describe the solution you'd like
Add a boolean flag to SqsProperties.Listener class; autostart or autoStartup (if you wanna be consistent with the property in SqsContainerOptions class).

Describe alternatives you've considered
Disabling the whole SQS integration (using spring.cloud.aws.sqs.enabled) but it doesn't support this exact use case.

Additional context
N/A

Happy to send the PR if needed.

@tomazfernandes
Copy link
Contributor

Hi @akefirad, sounds good, looking forward to the PR.

@tomazfernandes tomazfernandes added component: sqs SQS integration related issue type: enhancement Smaller enhancement in existing integration labels Aug 17, 2024
@maciejwalkowiak
Copy link
Contributor

I may be missing something, but couldn't you mark listener beans as @ConditionalOnProperty("listeners.enabled") and just not create these beans at all when they are not needed?

@maciejwalkowiak maciejwalkowiak added the status: waiting-for-feedback Waiting for feedback from issuer label Sep 19, 2024
@akefirad
Copy link
Contributor Author

akefirad commented Oct 1, 2024

Sure, that could work. But it's not as flexible as the boolean auto-start flag. Also seems a bit cleaner to me. No strong opinion. LMK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: sqs SQS integration related issue status: waiting-for-feedback Waiting for feedback from issuer type: enhancement Smaller enhancement in existing integration
Projects
None yet
Development

No branches or pull requests

3 participants