-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: fixes for subscriber and publisher semantics #164
Merged
asyncapi-bot
merged 6 commits into
master
from
changes_for_subscriber_and_publisher_concepts
Feb 11, 2023
Merged
feat: fixes for subscriber and publisher semantics #164
asyncapi-bot
merged 6 commits into
master
from
changes_for_subscriber_and_publisher_concepts
Feb 11, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ow the publisher template class takes data from the spec where the definition is subscriber and the same the other way around. Prbly for v3 this will need to change again, as the semantis discussion is still in place
emilianozublena
changed the title
Changes for subscriber and publisher concepts
refactor: Changes for subscriber and publisher concepts
Jan 16, 2023
emilianozublena
changed the title
refactor: Changes for subscriber and publisher concepts
refactor: refactor for subscriber and publisher semantics
Jan 16, 2023
emilianozublena
changed the title
refactor: refactor for subscriber and publisher semantics
refactor: fixes for subscriber and publisher semantics
Jan 16, 2023
…ut a spec and generated code. This will come in handy whenever we swtich to the ReactJS template engine
…ckslash as native classes on PHP are safer to import using that, otherwise there might be issues with namespaces if the package is introduced on something else than the root namespace
emilianozublena
changed the title
refactor: fixes for subscriber and publisher semantics
feat: fixes for subscriber and publisher semantics
Jan 18, 2023
@emilianozublena release PR merged. You just need to solve some conflicts here |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
derberg
approved these changes
Jan 31, 2023
/rtm |
asyncapi-bot
deleted the
changes_for_subscriber_and_publisher_concepts
branch
February 11, 2023 19:30
🎉 This PR is included in version 0.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR changes how code is generated. It'll change which channels are "introduced" in our Publisher and Subscriber classes. With this PR the
final class Publisher
will actually be loaded with operations/channels described as "subscribe" in the AsyncAPI file, and the same happens the other way around, thefinal class Subscriber
will be loaded with operations/channels described as "publish" in the AsyncAPI file.There's an extra change i've introduced which i don't think it deserved a standalone PR (but if anyone else thinks it does, happy to do it) which is removing once and for all the legacy naming of the init class that fires the factory and returns the Publisher/Subscriber classes. Initially it was called "BrokerAPI" which is the name i gave it before donating the template to the AsyncAPI Initiative, right now that doesn't make any sense and it creates noises. That class was changed to AsyncAPI and same goes for the tests it had around it.
Motivation and context
This was a required change in order to be able to publish this template, basically because i had a confusion on the semantics (which is something common and AsyncAPI v3 aims to solve it once and for all) and the template was actually being generated from a "server-side" kinda perspective. Right now its inline with what the spec always meant, which is a client perspective.
This is part of a broader topic as the confusion was kind of general across the AsyncAPI community as stated in several gh issues like this one: asyncapi/spec#520
Hopefully, whenever we reach to v3, this will get solved and we might need to do another update to the template (and prbly part ways in terms of versions where v2 specs will continue working w this version and v3 specs will work with a new one, hopefully with the React template engine as well). Here's the gh issue for async api v3: asyncapi/spec#618
How has this been tested?
Covered by some of the Unit Tests we already have as well as the running examples the bash script under utilities generates (by using a local rabbit mq instance). Though we need to pump up tests for sure
Screenshots (if appropriate)
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Checklist:
Go over all the following points, and put an
x
in all the boxes that apply.Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.
If you're unsure about any of these, don't hesitate to ask. We're here to help!