Appendix A. Message Schemas

This appendix contains the different message schemas used by Clever Coney Media to specify the JSON representations of the messages they send through RabbitMQ.

Note

Messages are represented using the JSON format, http://json.org/. Their definitions are expressed using draft 3 of the JSON schema language, http://tools.ietf.org/html/draft-zyp-json-schema-03. (CCM doesn't use draft 4 because their code generation tool doesn't support it yet.)

User message

The user message schema is used to represent all user messages (user-to-user, topic, or public-announce messages), and is coded as follows:

{
    "$schema": "http://json-schema.org/draft-03/schema#",
    "$content_type": "application/vnd.ccm.pmsg.v1+json",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "time_sent": {
            "type":"string",
            "format":"utc-millisec"
        },
        "sender_id": {
            "type": "integer",
            "optional": "false"
        },
        "addressee_id": {
            "type": "integer",
            "optional": "true"
        },
        "topic": {
            "type": "string",
            "optional": "true"
        },
        "subject": {
            "type": "string",
            "optional": "false"
        },
        "content": {
            "type": "string",
            "optional": "false"
        }
    }
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.38.92