Good evening,
I am working on a escript executable in plain elixir. I’m currently using RabbitMQ with the AMQP library which is great. I’m using rabbitMQ heartbeat to handle lack of connection. When i turn down my wifi connection there is a heartbeat_timeout and this is normal ! I just want to catch this message to avoid showing this to the user in his console, but i can’t figure it out. How can i do this ? The message in the console is below:
22:02:37.681 [error] GenServer #PID<0.257.0> terminating
** (stop) :heartbeat_timeout
Last message: :heartbeat_timeout
State: {:state, :amqp_network_connection, {:state, #Port<0.9883>, "client adress -> adress:5672", 10, #PID<0.260.0>, 131072, #PID<0.256.0>, :undefined, false}, #PID<0.259.0>, {:amqp_params_network, "1v62q9wtxu2sckso", "33oga51ho8yswo0gwswg44440kwc4k4okkksgg0kks4wkkcc08", "/", 'adress.com', 5672, 0, 0, 10, :infinity, :none, [&:amqp_auth_mechanisms.plain/3, &:amqp_auth_mechanisms.amqplain/3], [], []}, 0, [{"capabilities", :table, [{"publisher_confirms", :bool, true}, {"exchange_exchange_bindings", :bool, true}, {"basic.nack", :bool, true}, {"consumer_cancel_notify", :bool, true}, {"connection.blocked", :bool, true}, {"consumer_priorities", :bool, true}, {"authentication_failure_close", :bool, true}, {"per_consumer_qos", :bool, true}]}, {"cluster_name", :longstr, "rabbit@adress-production.localdomain"}, {"copyright", :longstr, "Copyright (C) 2007-2015 Pivotal Software, Inc."}, {"information", :longstr, "Licensed under the MPL. See http://www.rabbitmq.com/"}, {"platform", :longstr, "Erlang/OTP"}, {"product", :longstr, "RabbitMQ"}, {"version", :longstr, "3.5.7"}], :none, false}