-
-
Notifications
You must be signed in to change notification settings - Fork 74
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: create Anypoint MQ bindings #63
feat: create Anypoint MQ bindings #63
Conversation
ci: update global workflows
Co-authored-by: asyncapi-bot <info@asyncapi.io>
Co-authored-by: asyncapi-bot <info@asyncapi.io>
update from upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate more about the Server Binding Object. What is the point of having it really? in your binding example you just provide binding version, rest of the props just look like original Server object.
I'm curious. Why do we need a binding for this? I don't think AnypointMQ is a protocol. In the end, it's a regular HTTP call. Can't this be expressed just by using |
Anypoint MQ is a message broker that has a RESTful API but is normally accessed via a "native" client that operates on a slightly different level of abstraction than the REST API. For example, the native client doesn't need the So if (As an aside, i would have preferred that level of fundamental objection to this project when i started it, not after i've completed it.) |
anypointmq/README.md
Outdated
This is also the `bindingVersion` for all binding objects defined by this specification. | ||
In any given binding object, `latest` MAY alternatively be used to refer to the currently latest published version of this bindings specification. | ||
|
||
The version of the AsyncAPI specification to which these bindings apply is `2.1.0`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have this here? Why couldn't this binding be applied to a potential 2.2.0
or 2.1.1
version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have this here? Why couldn't this binding be applied to a potential
2.2.0
or2.1.1
version?
i noticed that none of the other binding specs are tied to a spec version, but in writing the binding spec i definitely had in mind to close the gap between AsyncAPI 2.0.0
and the Anypoint MQ protocol. So i considered it prudent to state that. In truth the binding spec also applies to 2.1.0
as far as i can tell.
@fmvilas : If you are opposed to binding specs being explicitly tied to AsyncAPI spec versions, then i'll remove this. Let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not opposed but I think we should align in the way we do it, so the rest of the bindings can do it in the same way. Would you mind opening a separate issue for that and removing this line for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opened asyncapi/spec#590
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and removed the line from the binding spec.
I see. That seems to be a thing of your client, still not really a protocol but probably better suited as an extension. A binding has to describe everything you need to communicate with a remote endpoint. If I wanted to publish or subscribe to AnypointMQ using the REST API with curl or my own client, that binding would not be sufficient. And if we improve the binding, then it becomes unnecessary as per the reasons I described above.
I'm sorry, Gerald. We really don't want you to work for nothing but you have to understand that 1. our time is limited, and 2. our knowledge of the AnypointMQ is close to zero. It's been right now that I found time to investigate and realized it was just a REST API. In any case, your work is not going into the void. As I said, I think this can be an extension and thus the work still applies. |
I disagree:
Put differently, if a message broker where to expose a SOAP-based API and another one a JSON-RPC API, both of which are HTTP-based, would you reject AsyncAPI protocol definitions for these? Would you require every AsyncAPI doc for these brokers to define SOAP and JSON-RPC payload structures using the The If there were no Anypoint MQ protocol and bindings, then all AsyncAPI documents that interact with Anypoint MQ would have to use I think this discussion highlights the urgent need for a very general clarification: are AsyncAPI protocols just network protocols? Or are they (as i argue above) the mechanism (via bindings) by which the AsyncAPI messaging model is mapped to and adapted to the native messaging model of a broker (server)? Such that, in the extreme - like for JMS - the AsyncAPI protocol ( |
Indeed. This needs to be well defined. I see your point, Gerald. Now we just need to figure out what's the best thing to do here. Should we define AsyncAPI protocols as "just network protocols" and thus removing |
In retrospect, I think we shouldn't be so strict with this. So you have all my support in this becoming a binding. Thanks for ellaborating on this, Gerald. Now, that said, there are some comments pending to solve in this PR:
With all of that missing, I think it's hard but not imposible to make it for 2.1.0 of the spec. However, since the release cycle of the bindings is independent of the spec, you probably want to create a placeholder binding definition (like the one for jms, mercure, and many others) and then calmly work on this PR. How does that sound? In any case, September is not far so that's also an option. |
My opinion is that the latter is the more useful choice: an AsyncAPI protocol (and the associated bindings) should capture everything that's common for message producers/consumers interacting with servers that share that AsyncAPI protocol. There is a wide range of possibilities:
In summary, i think it's most practically useful to view AsyncAPI protocols and bindings as capturing all client-visible commonalities between AsyncAPI servers that share that AsyncAPI protocol. In all cases that includes the messaging model (such as the supported protocol headers, data types for application headers, ways of encoding message bodies (bytes, streams, text, ...), routing information, support for correlation IDs, message groups, etc.); in some cases that also includes the client library (such as for |
i'll go back to being on vacation now, so let's aim for the next slot (September). |
Oh it's true. You were on vacations. Come on man! Don't want to hear from you until you're back 😄 Enjoy your holidays! |
the idea was simply to
|
it works as it is (without organization and environment) in an implementation-independent way, due simply to the inherent nature of authenication against the Anypoint MQ broker with a registered Anypoint MQ client app. My proposal would be to publish the binding spec as it is, gain experience, and improve it, if needed, in a subsequent version, such as by adding organization and environment if found useful. |
Other than my comment related to restricting to 2.0.0 version, it looks good to me. Happy to approve and merge once the change has been done. |
@derberg I just realized you also have to approve. Can you have a look please? |
As requested, removing mention of AsyncAPI version (`2.1.0`) this binding spec was developed against/for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left few comments, I really think we should follow the approach of just putting This object MUST NOT contain any properties. Its name is reserved for future use.
under the section where we do not have any binding object really. It is consistent with other bindings.
Also really confusing part is about Server Object, and really suggest IBM MQ binding approach.
Regarding organization and environment. I agree this can be added later. For me as not experienced user of Anypoint MQ it is super confusing that I do not have to provide them anywhere while all docs talk about it https://help.mulesoft.com/s/article/How-to-use-Anypoint-MQ-Stats-API but I'm a total noob here and fully rely on your expertise so let us leave it as it is
commited the changes requested @derberg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for your patience @GeraldLoeffler
@fmvilas I think you need to approve again and then we are ready to merge to master as we are anyway not doing releases in this repo yet
@GeraldLoeffler I want to merge but you need to update to latest master, I think you did not select option for maintainers to update the branch too |
i've now newly fetched from upstream ( |
Description
Adding binding specification for Anypoint MQ as requested in asyncapi/spec#514 .
Contains JSON schemata as per the latest convention for binding specifications.
Related issue(s)
asyncapi/spec#514