chirpstack / chirpstack-gateway-bridge

ChirpStack Gateway Bridge abstracts Packet Forwarder protocols into Protobuf or JSON over MQTT.
https://www.chirpstack.io
MIT License
422 stars 270 forks source link

Issue #97 - remove QoS > 0 bottleneck with non-blocking MQTT publish #101

Closed lglenat closed 5 years ago

lglenat commented 5 years ago

This fixes https://github.com/brocaar/lora-gateway-bridge/issues/97 by adding goroutines to uplink frames publishing loop.

I tested the updated app on a Tektelic Micro gateway receiving about 50 packets per second. There was no bottleneck with QoS 1. QoS 0 is still working fine. I tested both run_v2 and run_v3 (by using json and v2_json as marshallers).

Future work (?): switch to using token.WaitTimeout() instead of token.Wait() in backend.go line 487 to log PUBACK timeouts.

brocaar commented 5 years ago

Thanks @lglenat! I've merged your changes :)