Tuesday 15 February 2011

php - Documenting AMQP messages -


What will be the best practice for documenting AMQP messages? My company is developing some different house applications (by different teams) who use rabbit MQ asynchronous messaging with each other. Each type of communication uses custom message format, e.g. "Document published" event:

  $ documentPublishedEvent = array ('document_type' = & gt; 'invoice', 'published_on' = & gt; '2012-02-15', 'published_ by' = & Gt; 'gym',);   

The message format always initially agrees with all the teams involved in AMQP communication but later it is in the hands of the owner because we do not have any shared documents ATM.

We need to ensure that there is a strict specification which we can rely on. We came up with the following ideas:

  • Good old wiki (shared among teams) - Every message can have a detailed description - The problem is that we will not know that the wiki update stall Or some details are missing composer components shared with special categories for all types of messages (for example class document publishing events) - this application may include this component, but problems can be complicated Minister, because each application can "meet every possible message" Do

    There is no better choice?

    You can use the concept of special classes in each application without musician support and generate documentation from those special sections. Write a script that will present whatever documentation format you have on package / deployment of code. It is still easy if you use a composer package that handles the publication / documentation of these classes so that each application contains the same API as RabbitMQ and contains the documentation generation.

    Each application will only need classes to publish, the production process is used to document which is deployed by you each time.

    No comments:

    Post a Comment