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

Confusions with the Publish and Subscribe meaning/perspective #520

Closed
5 tasks done
fmvilas opened this issue Mar 19, 2021 · 16 comments
Closed
5 tasks done

Confusions with the Publish and Subscribe meaning/perspective #520

fmvilas opened this issue Mar 19, 2021 · 16 comments

Comments

@fmvilas
Copy link
Member

fmvilas commented Mar 19, 2021

Description

I'm creating this issue to hold discussions about the problem with the publish/subscribe perspective. As it is right now, the perspective is from the "client". Let's put it a different way:

  • A1 is the owner of one application.
  • A2 is the owner of another application.
  • If on the A1 AsyncAPI file it says publish, it means the A1 application allows or expects that A2 (and others) can publish messages to A1.
  • If on the A1 AsyncAPI file it says subscribe, it means the A1 application allows or expects that A2 (and others) can subscribe to receive messages from A1.
  • Same applies if you see an A2 AsyncAPI file.

Now, this is highly confusing especially for those working on private broker-based architectures. It's not for those working with public asynchronous APIs.

This is not an opinion. This is how it works right now. Switching the meaning of the verbs would not work either, as we saw in the past. Happy to listen for alternatives :)

Related issue(s)

@jonaslagoni
Copy link
Member

jonaslagoni commented Mar 19, 2021

To me it is not so much about private broker-based architectures (since you might not have a broker) but rather those who use AsyncAPI to define the behavior of the specific application. i.e. you want to define what resources A1 provides to / consumes from others not what others may provide to / consume from A1.

@GeraldLoeffler
Copy link
Contributor

GeraldLoeffler commented Mar 19, 2021

(Paraphrasing from #390 (comment):)
The AsyncAPI document for A1 should use

  • applicationSent when A1 sends messages to a channel (to which A2 might be subscribed)
  • applicationReceived when A1 receives messages from a channel (to which A2 might publish).

This means that the AsyncAPI document for A2 (which is equally valid!) should use

  • applicationReceived when A2 receives messages from a channel (such as those that were sent by A1)
  • applicationSent when A2 sends messages to a channel (such as those to be received by A1)

@GeraldLoeffler
Copy link
Contributor

i've submitted PR #521 that adds wording to the current spec simply to clarify the current meaning of publish and subscribe.

@nictownsend
Copy link
Contributor

Continuing with thread in #390 - I do like the idea of splitting channels away from operations.

The ability to define what a channel looks like, then applications state the operations they perform on a channel.

However, it means either applications state the payload as part of their operation (which could lead to many discrepancies across spec files) - or the channel states its single payload/allOf (but different applications/operations can't have differing payloads). Which I'm guessing for NATS (request/reply) becomes a bigger problem.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label May 19, 2021
@derberg derberg removed the stale label May 19, 2021
@derberg
Copy link
Member

derberg commented May 19, 2021

This issue is related to #538 as well

@fmvilas
Copy link
Member Author

fmvilas commented Jul 12, 2021

Added #538 to the issue description to track them together.

@fmvilas
Copy link
Member Author

fmvilas commented Aug 2, 2021

Added #599 to the issue description.

@fmvilas
Copy link
Member Author

fmvilas commented Sep 6, 2021

Added a new proposal to the issue description: #618

@fmvilas fmvilas added this to the 3.0.0 Release milestone Sep 15, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@dret
Copy link

dret commented May 9, 2022

Is this one still active? I went through 2.4.0 right now and still couldn't quite figure out what these word mean. The one-sentence descriptions given in https://www.asyncapi.com/docs/specifications/v2.4.0#channelsObject are not explaining the semantics and there doesn't seem to be a place in the spec that does? Maybe this has caused sufficient confusion to warrant a section in https://www.asyncapi.com/docs/specifications/v2.4.0#definitions?

@jonaslagoni
Copy link
Member

jonaslagoni commented May 16, 2022

@dret it is yes. Would be good to explain the semantics better for v2, do you want to champion this change?

For version 3, those confusions should be completely gone. See #618

@dret
Copy link

dret commented May 16, 2022 via email

@jonaslagoni
Copy link
Member

i can give it a try. what's the best process?

Awesome 👍

There is no one way, but I would suggest having something concrete suggestion to discuss around, so creating a PR that applies the changes you see as being a better description 🙂 You can do that by editing the markdown file of the AsyncAPI specification.

Not sure if it needs to wait until the next spec version up to the code owners @dalelane @fmvilas @derberg, otherwise we just retarget your PR so it will be included in the next version 🙂

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Sep 14, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Jul 14, 2023
@github-actions github-actions bot removed the stale label Aug 31, 2023
@smoya smoya closed this as completed Dec 7, 2023
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

8 participants
@fmvilas @smoya @dret @GeraldLoeffler @derberg @jonaslagoni @nictownsend and others