Need to fix rabbitmq/rabbitmq-erlang-client#91 and revert pma/amqp#73 (comment)
Re-implementation of https://github.com/rabbitmq/rabbitmq-metronome in Elixir. This is the simplest possible plugin that can be used as a base for making more complex ones. Some explanations available at https://binarin.ru/posts/2017-04-19-rabbit-plugins-in-elixir.html
This'll work only with RabbitMQ versions starting at 3.7.0.
make run-broker
Then you can test that everything works by issuing the following in that shell:
rr(amqp_connection).
{ok, Conn} = amqp_connection:start(#amqp_params_direct{}).
{ok, C} = amqp_connection:open_channel(Conn).
amqp_channel:call(C, #'queue.declare'{queue= <<"abc">>}).
amqp_channel:call(C, #'queue.bind'{queue= <<"abc">>, exchange= <<"metronome">>, routing_key= <<"#">>}).
amqp_channel:call(C, #'basic.consume'{queue= <<"abc">>}).
%% after some time has passed
flush().
make ct
This will compile everything and then run Common Test suite that was borrowed from original metronome plugin verbatim.