Overview

Service Catalog provides a REST API for service discovery described below:


The following diagram shows the data model of Service Catalog:

The attributes are described below:

Catalog object consists of:

Service object consists of:

Doc object consists of:

MQTT API

Service catalog also supports MQTT for service registration and de-registration.

Service registration is similar to POST and PUT methods of REST API. Here, a service uses a pre-configured topic (via config file) for publishing the message.

The will message of the registered service is used to de-register it from the cataog whenever the service disconnects.

Announcement over MQTT: 

Service Catalog Announces the service registration status via MQTT using retain messages. 

The the message topics follow following patterns:

<topicPrefix >/< RFC6339 service name>/<service_id>/alive   : (Retained message) The body contains service description of alive service

<topicPrefix >/< RFC6339 service name>/<service_id>/dead : (Not retained message) The body contains service description of alive service 


The retained messages are removed whenever service de-registers.

topicPrefix  can be configured via config file.

Versioning

API version is based on semver. The version is included as a parameter to the MIME type of all HTTP responses:

application/json;version=X.X.X