HomeDevCentral

Implement /delivery/register_consumer API method

Description

Implement /delivery/register_consumer API method

Summary:
Declare a queue, bind the queue to an exchange.

A first approach was to connect to the broker at server start,
a channel, then to interact with the channel when requests come.

This approach isn't optimal as:

  • channel can be closed by errors like a non existing exchange
  • we want to recover if the broker restarts
  • the pika loop and the Werkzeug loop could behave differently

So each request will open/close a connection to the broker.

Ref T1210

Test Plan: Fire an API request, get a key, check a queue exists matching this key.

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T1210

Differential Revision: https://devcentral.nasqueron.org/D991

Details

Provenance
derecksonAuthored on May 27 2017, 10:25
derecksonPushed on May 27 2017, 10:31
Reviewer
dereckson
Differential Revision
D991: Implement /delivery/register_consumer API method
Parents
rNDbb0d5a02f90a: Don't require sqlite3
Branches
Unknown
Tags
Unknown
Tasks
T1210: Provide a delivery API to consume notifications in HTTP