Are there any tools for generating message queue documentation from POJOs?

by Neonfirelights   Last Updated July 12, 2019 15:05 PM

We have a service that consumes from several Kafka topics containing JSON messages. I'm searching for a way to either have documentation for the topics be generated from the primary consumer's JSON POJOs or to have the primary consumer's JSON POJOs generated from a JSON specification.

Are there any tools available that are capable of automatically generating documentation for the topic the same way you can use Swagger to document REST APIs?

Alternatively is there any tool out that there that could automatically translate a POJO/Jackson class into a specification for a JSON object? E.G.

public class MyTopicMessage {
    /**
     * First argument. May be any string value.
     */
    private String argument1;
    /**
     * Second argument. Only negative integers are valid.
     */
    private int argument2;

    public String getArgument1() {
        return argument1;
    }

    public MyTopicMessage setArgument1(String argument1) {
        this.argument1 = argument1;
        return this;
    }

    public int getArgument2() {
        return argument2;
    }

    public MyTopicMessage setArgument2(int argument2) {
        this.argument2 = argument2;
        return this;
    }
}

To this (or a more useful version of this):

# MyTopicMessage
Type: Object

## attributes

### argument1

Type: String

First argument. May be any string value.

### argument2
Type: int

Second argument. Only negative integers are valid.

Alternatively, are there any tools that could transform a JSON specification into POJOs?



Related Questions


How to document Kafka/Kinesis streams

Updated April 27, 2018 13:05 PM

Task Assigning at a Distributed System

Updated June 01, 2017 23:05 PM

Designing clickstream analysis?

Updated June 10, 2017 18:05 PM

an open source solution for JMS

Updated July 26, 2017 09:05 AM