astarte-platform / astarte_vmq_plugin

Astarte VerneMQ plugin publishes incoming messages on an AMQP exchange with some additional metadata, so they can be processed by other components.
http://astarte-platform.org/
Apache License 2.0
16 stars 10 forks source link

Start the plugin OTP application as permanent #37

Closed rbino closed 3 years ago

rbino commented 3 years ago

We want to start the plugin as permanent to make sure that if the plugin application crashes, VerneMQ comes down with it (and gets restarted by K8s). To do so, we need to define an erlang wrapper since right now VerneMQ assumes the custom start function is contained in a module with the same name as the application, which can't be an Elixir module due to naming constraints. This should fix the situations where VerneMQ was not able to publish after a RabbitMQ disconnection causing a plugin crash.

Signed-off-by: Riccardo Binetti riccardo.binetti@ispirata.com

codecov[bot] commented 3 years ago

Codecov Report

Merging #37 (f073a28) into release-0.11 (c020213) will decrease coverage by 1.50%. The diff coverage is 0.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           release-0.11      #37      +/-   ##
================================================
- Coverage         75.67%   74.17%   -1.51%     
================================================
  Files                 8        9       +1     
  Lines               148      151       +3     
================================================
  Hits                112      112              
- Misses               36       39       +3     
Impacted Files Coverage Δ
src/astarte_vmq_plugin.erl 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c020213...f073a28. Read the comment docs.