Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

projectatomic/commissaire-service

Repository files navigation

commissaire-service

Commissaire Service Framework

Documentation Build Status

Invocations

The library uses jsonrpc v2 for remote invocation and notifications internals.

Note: The last element for the routing_key must match the method to be called

Example

{
    "jsonrpc": "2.0",                             // Required header noting version of jsonrpc
    "id": "6829688e-649d-4de7-8649-afefca88781d", // Unique message id
    "method": "add",                              // The remote method to call
    "params": [1, 2]                              // The remote parameters to provide to the method
}

Example Response

{
    "jsonrpc": "2.0",                             // Required header noting version of jsonrpc
    "id": "6829688e-649d-4de7-8649-afefca88781d", // Unique message id
    "result": 3                                   // Result of the call
}

Example Error

{
    "jsonrpc": "2.0",                             // Required header noting version of jsonrpc
    "id": "6829688e-649d-4de7-8649-afefca88781d", // Unique message id
    "error": {
        "code": -32602,                           // http://www.jsonrpc.org/specification#error_object
        "message": "Method not found"             // Error message or Exception message
        "data": {                                 // Houses exception
            "exception": "TypeError"              // The name of the exception class or None
        }
    }
}

Creating a Service

See the documentation.