tarantool / mqtt

Tarantool MQTT client
tarantool.org
BSD 2-Clause "Simplified" License
39 stars 10 forks source link

mqtt doesn't work with rabbitmq #6

Closed zloidemon closed 7 years ago

zloidemon commented 7 years ago

This is not one task, it is list of issues:

Configuration of rabbitmq:

[
  {rabbit, [
    {cluster_nodes, {['rabbit@tt01'], ram}},
    {cluster_partition_handling, ignore},
    {tcp_listen_options,
         [binary,
         {packet,        raw},
         {reuseaddr,     true},
         {backlog,       128},
         {nodelay,       true},
         {exit_on_close, false}]
    },
    {frame_max, 131072},
    {hipe_compile, true},
    {log_levels, [{connection, info}]},
    {default_user, <<"guest">>},
    {default_pass, <<"guest">>}
  ]},
  {kernel, [
    {inet_dist_listen_max, 9105},
    {inet_dist_listen_min, 9100}
  ]},
  {rabbitmq_management, [
    {listener, [
      {port, 15672}
    ]}
  ]},
  {rabbitmq_mqtt, [
    {allow_anonymous,  false},
    {vhost,            "/test"},
    {tcp_listeners, [1883]}
  ]}
].

Console commands to configuration mutt and enable web interface to watch on events and etc:

rabbitmq-plugins enable rabbitmq_management
rabbitmq-plugins enable rabbitmq_mqtt
dedok commented 7 years ago

@zloidemon here are examples https://github.com/tarantool/mqtt/blob/master/test/api.lua#L91 https://github.com/tarantool/mqtt/blob/master/test/api.lua#L106

Also error handling issues were fixed