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

Provide support to configure the bindings in the @AsyncOperation #288

Closed
ctasada opened this issue Jul 14, 2023 · 2 comments
Closed

Provide support to configure the bindings in the @AsyncOperation #288

ctasada opened this issue Jul 14, 2023 · 2 comments
Labels
enhancement New feature or request staged for release

Comments

@ctasada
Copy link
Collaborator

ctasada commented Jul 14, 2023

Describe the feature request
SpringWolf provides plugins for Kafka or RabbitMQ bindings, but there's no other way to configure binding via the annotations.

Having something like

@AsyncOperations(
    bindings = {@GooglePubSubBinding(
        topic = "my-topic",
    )}
)

We may need to add different annotations to represent the different bindings, but there's no need to add all the bindings at the same time.

Motivation
The provided plugins are really convenient, but when an unsupported binding is needed, the current approach is limiting.

Technical details
I'm happy to provide a PR providing a first batch of binding annotations. For sure we need to consider cases where the plugins may be "conflicting" in which case we need to define which definitions takes precedence. I think the information in the annotation should probably overwrite any other autogenerated information.

Describe alternatives you've considered
Providing plugins for each binding seems overkill, mainly when some of those of those bindings may not have specific Spring supported annotations, like GooglePubSub.

@ctasada ctasada added the enhancement New feature or request label Jul 14, 2023
@timonback
Copy link
Member

@sam0r040 and me came across the issue some time ago.

Due to limitations of combining annotations and generics (bindings=@GooglePubSubBinding) we opted for an additional annotation.
Our solution was the addition of kafka and amqp specific OperationBinding operations. See https://www.springwolf.dev/docs/configuration/documenting-consumers#amqpasyncoperationbinding

For sure what is missing currently is a generic annotation to let users simply define the (basic) binding.

@timonback
Copy link
Member

Thank you for the report, the issue has been addressed in the new release.

Docs will follow soon on the website, proposed documentation: https://github.com/springwolf/springwolf.github.io/pull/62/files#diff-07b414902f2f07f5c083d5a81a4ee3730ad48b61787224581b2160a2f5b13c05

Feel free to reopen this issue if there is still something missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request staged for release
Projects
None yet
Development

No branches or pull requests

2 participants