Issue
I am trying to provide some services over ActiveMQ using Camel routing features. But I need my clients to know what kind of messages they can send over the ActiveMQ. I am thinking of something like swagger documentation for Spring MVC rest APIs. Is there any mechanism for that or I should do it manually?
Solution
Thanks to @Helen's comment I found out about AsyncAPI. It provides documentation and code generation tools for services provided over event-driven architectures. It is based on OpenAPI specifications like Swagger. As stated in AsyncAPI specifications V2.1.0:
The AsyncAPI Specification is a project used to describe and document message-driven APIs in a machine-readable format. It’s protocol-agnostic, so you can use it for APIs that work over any protocol (e.g., AMQP, MQTT, WebSockets, Kafka, STOMP, HTTP, Mercure, etc).The AsyncAPI Specification defines a set of files required to describe such an API. These files can then be used to create utilities, such as documentation, integration and/or testing tools.
You just have to create a YAML or JSON file. They provide multiple generators that generate codes and documents using your specification files. I used their HTML generators to generate my documents.
Also, this is a good example of how to define your specifications based on AsyncAPI.
Answered By - amin rahman
Answer Checked By - Cary Denson (JavaFixing Admin)