Notifications center/Delivery API: Difference between revisions

From Nasqueron Agora
(Created page with "The delivery API is a HTTP to AMQP gateway. It has been built to use an AMQP broker from languages where it's not convenient to use an AMQP library (e.g. TCL, Rust with OpenS...")
 
(No difference)

Latest revision as of 15:15, 25 May 2017

The delivery API is a HTTP to AMQP gateway.

It has been built to use an AMQP broker from languages where it's not convenient to use an AMQP library (e.g. TCL, Rust with OpenSSL 1.1+).

Administration guide

Introduction

This is a microservice shipped as a Flask application.

It reads configuration from environment, connects to a broker, fire a Werkzeug WSGI application.

Then, it accepts requests to interact with the broker in HTTP.

Deployment

Deploy the microservice

To deploy it, you can:

It requires the following environment variable to be defined:

  • BROKER_HOST: the domain of your broker
  • BROKER_USERNAME: an username to connect to the broker
  • BROKER_PASSWORD: a password to connect to the broker

If you don't use the / vhost, you can add:

  • BROKER_VHOST: the vhost to use

Front-end web server configuration

Then, in your front-end web server, amend the notifications center's configuration to pass requests for /delivery to this service.

server {
    server_name notifications.domain.tld;
    #...

    location /delivery {
        proxy_pass http://localhost:37180;
    }
}

Of course, you can also deploy this as a standalone product, it's fully independent from other notifications center component.

Exit codes

If the server can't attach to the broker, it will quit with the following exit codes:

  • 1: configuration can't be read, ensure you've BROKER_HOST, BROKER_USERNAME and BROKER_PASSWORD defined in the environment
  • 2: can't login to the broker

Report bugs or request new feature

You can create a task at DevCentral.