TheThingsArchive / ttn

The Things Network Stack V2
https://www.thethingsnetwork.org
MIT License
461 stars 276 forks source link

Feature/amqp device events consumer #671

Closed Sypheos closed 6 years ago

Sypheos commented 7 years ago

This pull request add the device events handling in the generic AMQP consumer.

It is mainly aimed for the integration since they listen to any messages incoming on a AMQP queue. It will give them the possibility to react to device events.

It use the routing key in the delivery to determine if the message is an event or an uplinks. Since they can be many different messages on one amqp queue the consumer do a few checks to be sure the routing key is valid and destined to him. Otherwise the delivery is not acknowledged so it can be send to another consumer.

Changes in the prototypes of some functions have been made for ease and consistency.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.01%) to 74.868% when pulling ad8baa2349585a5a8609b384f2b09962446ba09a on feature/amqp-device-events-consumer into 2723e122876f2f5c9dc9a4d51900dad3a5717394 on develop.