Giter Club home page Giter Club logo

mqtt's Introduction

Tarantool MQTT client


Key features:

  • non-blocking communication with MQTT brokers;
  • TLS support;
  • pretty low overheads, code based on libmosquitto.

Content


Prerequisites


Before reading any further, make sure you have an MQTT broker installed or use static build by passing STATIC_BUILD flags to cmake.

Building from source

Clone the repository with submodules and build the client:

$ git clone https://github.com/tarantool/mqtt.git
$ cd mqtt
$ git submodule update --init --recursive
$ mkdir build && cd build
$ cmake ..
$ make -j

Back to content

API


Lua API documentation.

new


Create a new mosquitto client instance.

Parameters:

client_id       - String. If NULL, a random client id will be generated 
                  and the clean_session parameter must be set to true.
clean_session   - Boolean. Set to true to instruct the broker to clean all 
                  messages and subscriptions on disconnect; false to instruct 
                  it to keep them. See the man page mqtt(7) for more details.
                  Must be set to true if the id parameter is NULL.

Note that a client will never discard its own outgoing messages on disconnect. Calling connect or reconnect will resend the messages.

Returns:

 mqtt object (see mqtt_mt) or raises error

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)

Back to content

connect


Connect to an MQTT broker.

Parameters:

opts.host          - Hostname or IP address of the broker to connect to.
opts.port          - Network port to connect to. Usually 1883.
opts.keepalive     - The number of seconds the broker waits since the last 
                     message before sending a PING message to the client.
opts.log_mask      - LOG_NONE, LOG_INFO, LOG_NOTICE, LOG_WARNING,
                     LOG_ERROR[default], LOG_DEBUG, LOG_ALL.
opts.auto_reconect - [true|false] - auto reconnect on (default) or off.

Returns:

true or false, emsg

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  instance:connect({
    host='127.0.0.1',
    port=1883,
    keepalive=60,
    log_mask=mqtt.LOG_NONE
  })

Back to content

reconnect


Reconnect to broker.

This function provides an easy way of reconnecting to the broker after connection loss. It uses the values provided in the connect call and must not be called prior.

Note: After the reconnection you must call subscribe to subscribe to topics.

See the connect opts.auto_reconect parameter.

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  instance:connect({host='127.0.0.1', port=1883, auto_reconect=false})
  ok, emsg_or_mid = instance:subscribe('topic')
  if not ok and not mqtt.connect then
    print('subscribe - failed, reconnecting ...')
    ok, _ = instance:reconnect()
  end

Back to content

subscribe


Subscribe to a topic.

Parameters:

sub -  Subscription pattern.
qos -  Requested Quality of Service for this subscription.

Returns:

true or false, integer mid or error message

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err_or_mid = instance:subscribe('my/topic/#', 1)
  if ok then
    print(ok, err_or_mid)
  end

Back to content

unsubscribe


Unsubscribe from a topic.

Parameters:

topic - Unsubscription pattern.

Returns:

true or false, integer mid or error message

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:unsubscribe('my/topic/#')
  if ok then
    print(ok, err)
  end

Back to content

destroy


Destroy an mqtt object.

Note: Call this function manually as the module does not use the Lua's GC.

Parameters:

None

Returns:

true or false, error message

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:destroy()
  if ok then
    print(ok, err)
  end

Back to content

lib_destroy


Cleanup everything.

Note: The module does not use the Lua's GC, the latter has to be called manually. To call it manually, first call destroy on each mqtt object.

Parameters:

None

Returns:

None

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  mqtt.lib_destroy()

Back to content

publish


Publish a message on a given topic.

Parameters:

topic      - Null-terminated string of the topic to publish to.
payload    - Pointer to the data to send.
qos        - Integer value 0, 1 or 2 indicating the Quality of Service to be
             used for the message. When you call the library with "mqtt = require('mqtt')",
             you can use mqtt.QOS_0, mqtt.QOS_1 and mqtt.QOS_2 as a replacement 
             for some strange digital variable.
retain     - Set to true to make the message retained. You can also use the values
             mqtt.RETAIN and mqtt.NON_RETAIN to replace the unmarked variable.

Returns:

true or false, emsg, message id (i.e. MID) is referenced in the publish callback

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:publish('my/topic/#', 'Some payload as string', mqtt.QOS_0, mqtt.RETAIN)
  if ok then
    print(ok, err)
  end

Back to content

will_set


Configure the will information for a mosquitto instance. By default, clients do not have a will. Must be called before calling connect.

Parameters:

topic      - Topic for which to publish the will.
payload    - Pointer to the data to send.
qos        - Integer value 0, 1 or 2 indicating the Quality of Service to be
             used for the will.
retain     - Set to true to make the will a retained message.

Returns:

true or false, emsg

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:will_set('my/topic/#', 'Some payload as string', 0, true)
  if ok then
    print(ok, err)
  end

Back to content

will_clear


Remove a previously configured will. Must be called before calling connect.

Returns:

true or false, emsg

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:will_clear()
  if ok then
    print(ok, err)
  end

Back to content

login_set


Configure a username and password for the mosquitto instance. Supported only by the brokers that implement the MQTT spec v3.1. By default, no username or password will be sent. If the username is NULL, the password argument is ignored.

Must be called before calling connect.

Parameters:

username - Username to send as a string or NULL to disable
           authentication.
password - Password to send as a string. Set to NULL to send 
           just a valid username.

Returns:

true or false, emsg

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:login_set('user', 'password')
  if ok then
    print(ok, err)
  end

Back to content

tls_insecure_set


If set to true, do not check if the hostname in the server's certificate matches the hostname of the server to connect to.

If the check is disabled, connection encryption is pointless and it is impossible to guarantee that the host you are connecting to is not impersonating the server. This can be useful during the initial server testing but makes it possible for a malicious third party to impersonate the server through, e.g., DNS spoofing.

Do not use this function in a production environment.

Must be called before connect.

Parameters:

value - If set to false (default), certificate hostname is checked. 
        If set to true, no checking is performed and connection is insecure.

Returns:

true or false, emsg

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:tls_insecure_set(true)
  if ok then
    print(ok, err)
  end

Back to content

tls_set


Configure a client for certificate-based SSL/TLS support. Must be called before connect.

Define certificates signed by a Certificate Authority (CA) as trusted (i.e. the server certificate must be signed by it) using cafile.

If the server to connect to requires clients to provide a certificate, set the certfile and keyfile paths to your client certificate and private key files. If the private key is encrypted, provide a password callback function or enter the password via the command line.

Parameters:

cafile      - Path to a file containing PEM-encoded trusted CA
              certificate. Either the cafile or capath must not be NULL.
capath      - Path to a directory containing the PEM-encoded trusted CA
              certificate files. See mosquitto.conf for more details on
              configuring this directory. Either the cafile or capath must 
              not be NULL.
certfile    - Path to a file containing a PEM-encoded certificate
              for this client. If NULL, the keyfile must also be NULL and no
              client certificate will be used.
keyfile     - Path to a file containing a PEM-encoded private key for
              this client. If NULL, the certfile must also be NULL and no
              client certificate will be used.
pw_callback - TODO: implement me.

Returns:

true or false, emsg

See also: tls_insecure_set.

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:tls_set('my.pem', '/home/user/pems', 'my.ca', 'my.key')
  if ok then
    print(ok, err)
  end

Back to content

on_message

Set a message callback. Called when a message from the broker is received.

Parameters:

F - a callback function with the following form:
    function F(integer_mid, string_topic, string_payload, integer_gos, integer_retain)

Returns:

true or false, emsg

Example:

  mqtt = require('mqtt')
  instance = mqtt.new("client_id", true)
  -- Cut, see the connect function
  ok, err = instance:on_message(
    function(message_id, topic, payload, gos, retain)
      print('Recv. new message',
        message_id, topic, payload, gos, retain)
    end)
  if ok then
    print(ok, err)
  end

Back to content

Subscribe to events


Warning: Use the following functions with caution as incorrect calls can break asynchronous I/O loops!

Non-mandatory functions:

  • on_connect

  • on_disconnect

  • on_publish

  • on_subscribe

  • on_unsubscribe

See the detailed documentation of these functions in the mqtt.init.lua file.

Back to content

Performance tuning


TODO: describe me.

Back to content

Examples


The examples/connect.lua file shows how to connect to an MQTT broker.

The examples/producer_consumer_queue.lua file shows how Tarantool produces, passes, and consumes data to and from an MQTT broker via the MQTT connector in a non-blocking way.

Back to content

Copyright & License


LICENSE

Back to content

See also


Back to content


Please report bugs at https://github.com/tarantool/mqtt/issues.

We also warmly welcome your feedback in the discussion mailing list: [email protected].

mqtt's People

Contributors

bigbes avatar dedok avatar filonenko-mikhail avatar nagohak avatar opomuc avatar rtsisyk avatar runsfor avatar sofiayem avatar stefansaraev avatar totktonada avatar vr009 avatar vvzvlad avatar zwirec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mqtt's Issues

segfault on mqtt:destroy()

OS: Alpine Linux 3.5 (Linux as 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux)

Tarantool version: Tarantool 1.10.0-0-g42612ec04
MQTT lib version: 4adefc7

Case:

mqtt=require('mqtt')
m=mqtt.new()
m:connect()
m:destroy()

 Segmentation fault
  code: SEGV_MAPERR
  addr: 0x208
  context: 0x7f31be02f7c0
  siginfo: 0x7f31be02f8f0
  rax      0x0                0
  rbx      0x0                0
  rcx      0x2                2
  rdx      0x0                0
  rsi      0x1                1
  rdi      0x208              520
  rsp      0x7f31be02fe58     139851617992280
  rbp      0x41786ea8         1098411688
  r8       0x4                4
  r9       0x7f31be01fd80     139851617926528
  r10      0x55bfeefd4220     94282836689440
  r11      0x55bfeefd4270     94282836689520
  r12      0x208              520
  r13      0x1                1
  r14      0x40331000         1077088256
  r15      0x7f31bddfca10     139851615685136
  rip      0x7f31c262c2dc     139851691377372
  eflags   0x10202            66050
  cs       0x33               51
  gs       0x0                0
  fs       0x0                0
  cr2      0x208              520
  err      0x4                4
  oldmask  0x0                0
  trapno   0xe                14
Current time: 1532101361
Please file a bug at http://github.com/tarantool/tarantool/issues
Attempting backtrace... Note: since the server has already crashed,
this may fail as well
#0  0x55bfede1d479 in print_backtrace+9
#1  0x55bfedd4255a in _ZL12sig_fatal_cbiP9siginfo_tPv+ca
#2  0x7f31c261fe17 in sigwaitinfo+8
Aborted (core dumped)

Update CI/CD distros

Remove EOL. Add new ones (see .travis.yml in tarantool/tarantool).

Now CI fails (#19), need to fix it first.

on_disconnect not work?

In order to catch the problem with the connection, I use on_disconnect like this:

local function mqtt_disconnect_callback()
   print("MQTT disconnect!")
end
local function mqtt_connect_callback()
   print("MQTT connect!")
end
mqtt.wb:on_disconnect(mqtt_disconnect_callback)
mqtt.wb:on_connect(mqtt_connect_callback)

But in this case I get on_disconnect events about every second (together with on_connect). It seems to me that this is not the correct work of the subscription system for the disconnect event

2018-04-27 18:16:51.661 [61551] main/101/smart_sity_local.lua C> Tarantool 1.9.0-0-g14d33e3
2018-04-27 18:16:51.661 [61551] main/101/smart_sity_local.lua C> log level 4
2018-04-27 18:16:52.633 [61551] main C> entering the event loop
MQTT connect!
MQTT disconnect!
MQTT connect!
MQTT disconnect!
MQTT connect!
MQTT disconnect!
MQTT connect!
MQTT disconnect!
...

Lost error message

Абстракт: при возникновении ошибки в callback-функции теряется сообщение об ошибке.

Баг: подключаем mqtt, подключаемся к серверу, регистрируем функцию как callback, подписываемся на уведомления. Уведомление приходит, функция вызывается. Если в функции ошибка или вызов error, то сообщение об ошибке попадет в лог тарантула в виде "tarantool> 2018-07-03 21:25:30.715 [61663] main/109/lua utils.c:923 E> LuajitError: ", т.е. без текста ошибки.

Код:


local function mqtt_callback(message_id, topic, payload, gos, retain)
       error('test')
end

mqtt.wb = mqtt.new("id", true)
local mqtt_ok, mqtt_err = mqtt.wb:connect({host="localhost"})
mqtt.wb:on_message(mqtt_callback)
mqtt.wb:subscribe('/#', 0)

Publish always returns true (even if the server is unreachable)

Суть: если выполнить mqtt_object:publish при недостижимом сервере (например, остановленном или отключенным от сети), первые несколько минут он все равно вернет true. В аналогичном случае mosquitto_pub некоторое время висит, а потом говорит "Error: Operation timed out"

Как воспроизвести:

local mqtt = require 'mqtt'
mqtt.wb = mqtt.new("id", true)
mqtt.wb:connect({host="host",port=1883,keepalive=60,log_mask=mqtt.LOG_ALL})
--отключаем/останавливаем mqtt-сервер--
local status = mqtt.wb:publish("/topic", "value", mqtt.QOS_1, mqtt.NON_RETAIN)
print(status) --Возвращает "true"

mqtt is not usable after installing into the official tarantool:1.x-centos7 Docker image

Steps to reproduce:

  1. Deploy a container based on the tarantool/tarantool:1.x-centos7 image:

docker-compose.yml:

version: '3'

services:
  tarantool:
    container_name: tarantool
    build:
      context: .
      dockerfile: Dockerfile.tarantool
    command: tarantool /opt/tarantool/app.lua
    volumes:
      - ./app.lua:/opt/tarantool/app.lua
    ports:
      - '3301:3301'
      - '3333:3333'
      - '8080:80'
    network_mode: host

Dockerfile.tarantool:

FROM tarantool/tarantool:1.x-centos7

WORKDIR /

RUN yum -y install git cmake make gcc-c++ openssl openssl-devel
RUN tarantoolctl rocks install mqtt

WORKDIR /opt/tarantool

app.lua:

mqtt = require('mqtt')
  1. Container fails to start up:
a.kuzin@a:~/tmp/amq$ docker-compose up
Starting tarantool ... done
Attaching to tarantool
tarantool    | /.rocks/share/tarantool/mqtt/init.lua:32: module 'mqtt.driver' not found:
tarantool    | 	no field package.preload['mqtt.driver']
tarantool    | 	no file './mqtt/driver.lua'
tarantool    | 	no file './mqtt/driver/init.lua'
tarantool    | 	no file './mqtt/driver.so'
tarantool    | 	no file '/opt/tarantool/.rocks/share/tarantool/mqtt/driver.lua'
tarantool    | 	no file '/opt/tarantool/.rocks/share/tarantool/mqtt/driver/init.lua'
tarantool    | 	no file '/opt/.rocks/share/tarantool/mqtt/driver.lua'
tarantool    | 	no file '/opt/.rocks/share/tarantool/mqtt/driver/init.lua'
tarantool    | 	no file '/.rocks/share/tarantool/mqtt/driver.lua'
tarantool    | 	no 
tarantool exited with code 1

The reason is that the mqtt driver is not linked with mosquitto:

[root@caca61ec4fc2 tarantool]# ldd /.rocks/lib/tarantool/mqtt/driver.so
	linux-vdso.so.1 =>  (0x00007ffef4f02000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f1269ee1000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1269cc5000)
	libmosquitto.so.1 => not found
	libssl.so.10 => /lib64/libssl.so.10 (0x00007f1269a53000)
	libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f12695f0000)
	librt.so.1 => /lib64/librt.so.1 (0x00007f12693e8000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f126901a000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f126a2eb000)
	libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f1268dcd000)
	libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f1268ae4000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f12688e0000)
	libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f12686ad000)
	libz.so.1 => /lib64/libz.so.1 (0x00007f1268497000)
	libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f1268287000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f1268083000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f1267e6a000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f1267c43000)
	libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f12679e1000)
[root@caca61ec4fc2 tarantool]# ls -l /usr/lib64/ | grep libmosq
[root@caca61ec4fc2 tarantool]# ls -l /usr/local/lib64/ | grep libmosq
lrwxrwxrwx 1 root root      19 Apr 24 16:54 libmosquittopp.so -> libmosquittopp.so.1
lrwxrwxrwx 1 root root      23 Apr 24 16:54 libmosquittopp.so.1 -> libmosquittopp.so.1.6.2
-rwxr-xr-x 1 root root   65072 Apr 24 16:53 libmosquittopp.so.1.6.2
lrwxrwxrwx 1 root root      17 Apr 24 16:54 libmosquitto.so -> libmosquitto.so.1
lrwxrwxrwx 1 root root      21 Apr 24 16:54 libmosquitto.so.1 -> libmosquitto.so.1.6.2
-rwxr-xr-x 1 root root 1153624 Apr 24 16:53 libmosquitto.so.1.6.2

We need to fix the cmake script for correct installing of libmosquitto or correct linking of the driver.

Unable to install with tarantoolctl rocks on Linux

$ tarantoolctl rocks install mqtt
<..cut..>
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /home/alex/tmp/.rocks/share/tarantool/rocks/mqtt/scm-1/lib/mqtt/driver.so
-- Set runtime path of "/home/alex/tmp/.rocks/share/tarantool/rocks/mqtt/scm-1/lib/mqtt/driver.so" to ""
-- Installing: /home/alex/tmp/.rocks/share/tarantool/rocks/mqtt/scm-1/lua/mqtt/init.lua
CMake Error at third_party/mosquitto/build/cmake_install.cmake:41 (file):
  file cannot create directory: /usr/local/etc/mosquitto.  Maybe need
  administrative privileges.
Call Stack (most recent call first):
  mqtt/cmake_install.cmake:85 (include)
  cmake_install.cmake:42 (include)


gmake: *** [Makefile:118: install] Error 1

Error: Build error: Failed installing.

We want to use this library in Corona SDK

Hello
we want to use this library in Corona sdk, in windows.
We try and in line 32 of init.lua try to charge the local mqtt_driver = require('mqtt.driver').
This file dont exist.
the compilator try to find driver.lua.. and the file is driver.c
What can i do ?

You can not call :destroy() without :connect()

Case:

tarantool> mqtt = require 'mqtt'
tarantool> mqtt_object = mqtt.new()

tarantool> mqtt_object:destroy()
---
- error: '...ocuments/Nokia/glue/.rocks/share/tarantool/mqtt/init.lua:472: attempt
    to index field ''fiber'' (a nil value)'
...

tarantool> mqtt_object:connect()
---
- true
- ok
...

tarantool> mqtt_object:destroy()
---
- true
- ok
...

Cartridge segmentation fault when using "mqtt" module

Description

The mqtt module produces segmentation fault on a Cartridge cluster after the callback in on_message is invoked some number of times.

  • OS: Linux debian 4.19.0-20-amd64 # 1 SMP Debian 4.19.235-1 (2022-03-17) x86_64 GNU/Linux
  • tarantool: Tarantool 2.8.4-0-g47e6bd362
  • cartridge: 2.7.3-1
  • cartridge-cli: version: 2.12.0; OS/Arch: linux/amd64; git commit: b4ed1a2
  • mqtt: scm-1 (commit: db28374)

Steps to reproduce

  1. Install mqtt module to a cartridge app
  2. Connect to an instance through tarantoolctl connect
  3. Set mqtt broker's address and port in console:
host_addr = <address>
host_port = <port>
  1. Execute following lines:
mqtt = require('mqtt'); log = require('log'); fiber = require('fiber')
connection = mqtt.new('test-client', true)
connection:connect({ host = host_addr, port = host_port })
connection:on_message(function(...) log.warn{...} end)
connection:subscribe('test')
while true do connection:publish('test', 'testing testing testing'); fiber.sleep(2) end

After awhile this will produce a segmentation fault.

Segmentation fault

Segmentation fault
  code: SEGV_MAPERR
  addr: 0xc02ca91
  context: 0x7f5d503ff980
  siginfo: 0x7f5d503ffab0
  rax      0xc02ca91          201509521
  rbx      0x41a37ec0         1101233856
  rcx      0x10784a0          17269920
  rdx      0x27               39
  rsi      0xffffd8f0         4294957296
  rdi      0x41a37ec0         1101233856
  rsp      0x7f5d503ffdc0     140038755057088
  rbp      0x10784c8          17269960
  r8       0x27               39
  r9       0x4d5adcc461d      5315790390813
  r10      0x1529658cb8124a   5956490640233034
  r11      0x1                1
  r12      0x1051838          17111096
  r13      0x7f5d503ffe08     140038755057160
  r14      0x4132c080         1093845120
  r15      0x7f5d84145710     140039624611600
  rip      0x61c78c           6408076
  eflags   0x10202            66050
  cs       0x33               51
  gs       0x0                0
  fs       0x0                0
  cr2      0xc02ca91          201509521
  err      0x4                4
  oldmask  0x0                0
  trapno   0xe                14
Current time: 1651160523
Please file a bug at http://github.com/tarantool/tarantool/issues
Attempting backtrace... Note: since the server has already crashed, 
this may fail as well
#0  0x5ebfb2 in crash_signal_cb+92
tarantool/tarantool#1  0x7f5d86180730 in funlockfile+50
tarantool/tarantool#2  0x61c78c in lua_rawgeti+c
tarantool/tarantool#3  0x7f5d841449d0 in mosq_message_f+30
tarantool/tarantool#4  0x7f5d84150274 in handle__publish+234
tarantool/tarantool#5  0x7f5d8414b61e in packet__read+16e
tarantool/tarantool#6  0x7f5d84147285 in mosquitto_loop_read+c5
tarantool/tarantool#7  0x7f5d841458fc in mosq_io_run_one+1ec
tarantool/tarantool#8  0x656beb in lj_BC_FUNCC+34
tarantool/tarantool#9  0x61d0b8 in lua_pcall+78
tarantool/tarantool#10 0x5d5b33 in luaT_call+13
tarantool/tarantool#11 0x5d0b65 in lua_fiber_run_f+55
tarantool/tarantool#12 0x4563fc in _ZL16fiber_cxx_invokePFiP13__va_list_tagES0_+c
tarantool/tarantool#13 0x5f2d70 in fiber_loop+30
tarantool/tarantool#14 0x7fe19f in coro_init+3f

mqtt doesn't work with rabbitmq

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

  • No errors on connect, it always returns true although it doesn't work
  • No errors on publish/subscribe even NOT connected server
  • No errors on connect with incorrect protocol (for example AMQP)
  • Incorrect subscribe queues, for example I have virtual host /test, with queue test. Try to subscribe it with :subscribe('/test/test') will create a new queue instead use correct (looks like: mqtt-subscription-client_idqos0)
  • Publish doesn't work seems related to subscribe issue
  • Example :publish() doesn't work (syntax error)

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

MQTT eats 100% CPU

local mqtt = require('mqtt')
local connection = mqtt.new("Registry-LastHeard", true)
connection:connect({ host = 'localhost', port = 1883 })

Very long waiting period when connection is impossible

If the server is not responding, but not refused connection, the library will wait a very long time.

Code:

mqtt=require('mqtt')
m=mqtt.new()
m:connect{host="mail.ru"}

The above code will wait a very long time to complete the last command.

I use a workaround to check availability:

   local conn = socket.tcp_connect(mqtt_host, mqtt_port, 2)
   if (conn ~= nil) then
      conn:close()
      mqtt_object = mqtt.new(mqtt_name, true)
      local mqtt_status, mqtt_err = mqtt_object:connect({host=mqtt_host, port=mqtt_port})
      ...
   else
      error('Connect to host '..mqtt_host..' failed')
   end

socket.tcp_connect will return nil if the port is unavailable after 2 seconds, thus anticipating a long wait.
It would be nice if the MQTT library allowed you to set a timeout after which the connection is considered unsuccessful.

Cannot install (build) rock on Ubuntu 20.04 aarch64

Environment:

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"

$ uname -m
aarch64

Tarantool:

$ tarantool --version
Tarantool 2.10.5-0-g87d07d15e
Target: Linux-aarch64-RelWithDebInfo
Build options: cmake . -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_BACKTRACE=ON
Compiler: GNU-9.3.0
C_FLAGS:-g -O2 -fdebug-prefix-map=/build/tarantool-2.10.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fexceptions -funwind-tables -fno-common -fopenmp  -fmacro-prefix-map=/build/tarantool-2.10.5=. -std=c11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-gnu-alignof-expression -fno-gnu89-inline -Wno-cast-function-type
CXX_FLAGS:-g -O2 -fdebug-prefix-map=/build/tarantool-2.10.5=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fexceptions -funwind-tables -fno-common -fopenmp  -fmacro-prefix-map=/build/tarantool-2.10.5=. -std=c++11 -Wall -Wextra -Wno-strict-aliasing -Wno-char-subscripts -Wno-format-truncation -Wno-invalid-offsetof -Wno-gnu-alignof-expression -Wno-cast-function-type

Steps to reproduce:

$ tarantoolctl rocks install mqtt 1.5.1
Installing http://rocks.tarantool.org/mqtt-1.5.1-1.rockspec

Cloning into 'mqtt'...
remote: Enumerating objects: 394, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 394 (delta 3), reused 6 (delta 2), pack-reused 382
Receiving objects: 100% (394/394), 106.49 KiB | 1.72 MiB/s, done.
Resolving deltas: 100% (199/199), done.
Note: switching to 'db283743f4fc96dccf1e4c77afa6e5d54f660d4c'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Submodule 'third_party/mosquitto' (https://github.com/eclipse/mosquitto) registered for path 'third_party/mosquitto'
Cloning into '/tmp/luarocks_mqtt-1.5.1-1-Xdw39o/mqtt/third_party/mosquitto'...
remote: Enumerating objects: 33838, done.
remote: Counting objects: 100% (2117/2117), done.
remote: Compressing objects: 100% (675/675), done.
remote: Total 33838 (delta 1493), reused 2015 (delta 1427), pack-reused 31721
Receiving objects: 100% (33838/33838), 13.24 MiB | 4.31 MiB/s, done.
Resolving deltas: 100% (26211/26211), done.
Submodule path 'third_party/mosquitto': checked out '9470cd8c686b0d584d8c18549d48bf3229dd78ab'
-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found TARANTOOL: /usr/include (found version "2.10.5-0-g87d07d15e")
-- Tarantool LUADIR is /.rocks/share/tarantool/rocks/mqtt/1.5.1-1/lua
-- Tarantool LIBDIR is /.rocks/share/tarantool/rocks/mqtt/1.5.1-1/lib
-- tarantool: /usr/include;/usr/include/tarantool
-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/aarch64-linux-gnu/libcrypto.a (found version "1.1.1f")
-- WITH_DLT = OFF
-- Looking for getaddrinfo_a in anl
-- Looking for getaddrinfo_a in anl - found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_mqtt-1.5.1-1-Xdw39o/mqtt/build.luarocks
Scanning dependencies of target libmosquitto_static
[  3%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/actions.c.o
[  7%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/callbacks.c.o
[  7%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/connect.c.o
[ 11%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_auth.c.o
[ 11%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_connack.c.o
[ 15%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_disconnect.c.o
[ 19%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_ping.c.o
[ 19%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_pubackcomp.c.o
[ 23%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_publish.c.o
[ 23%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_pubrec.c.o
[ 26%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_pubrel.c.o
[ 26%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_suback.c.o
[ 30%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/handle_unsuback.c.o
[ 34%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/helpers.c.o
[ 34%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/logging_mosq.c.o
[ 38%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/loop.c.o
[ 38%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/memory_mosq.c.o
[ 42%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/messages_mosq.c.o
[ 46%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/mosquitto.c.o
[ 46%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/net_mosq_ocsp.c.o
[ 50%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/net_mosq.c.o
[ 50%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/options.c.o
[ 53%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/packet_datatypes.c.o
[ 57%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/packet_mosq.c.o
[ 57%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/property_mosq.c.o
[ 61%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/read_handle.c.o
[ 61%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/send_connect.c.o
[ 65%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/send_disconnect.c.o
[ 65%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/send_mosq.c.o
[ 69%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/send_publish.c.o
[ 73%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/send_subscribe.c.o
[ 73%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/send_unsubscribe.c.o
[ 76%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/socks_mosq.c.o
[ 76%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/srv_mosq.c.o
[ 80%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/thread_mosq.c.o
[ 84%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/time_mosq.c.o
[ 84%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/tls_mosq.c.o
[ 88%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/utf8_mosq.c.o
[ 88%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/util_mosq.c.o
[ 92%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/util_topic.c.o
[ 96%] Building C object third_party/mosquitto/build/lib/CMakeFiles/libmosquitto_static.dir/will_mosq.c.o
[ 96%] Linking C static library libmosquitto.a
[ 96%] Built target libmosquitto_static
Scanning dependencies of target driver
[ 96%] Building C object mqtt/CMakeFiles/driver.dir/driver.c.o
[100%] Linking C shared library driver.so
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
(.text+0x1240): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_ADR_PREL_LO21 against symbol `poly1305_blocks' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): in function `poly1305_init':
(.text+0x40): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_ADR_PREL_LO21 against symbol `poly1305_emit' which may bind externally can not be used when making a shared object; recompile with -fPIC
(.text+0x48): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): in function `poly1305_emit_neon':
(.text+0x9a0): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): in function `sha256_block_data_order':
(.text+0xf88): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): in function `sha512_block_data_order':
(.text+0x1108): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
make[2]: *** [mqtt/CMakeFiles/driver.dir/build.make:87: mqtt/driver.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:231: mqtt/CMakeFiles/driver.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Error: Build error: Failed building.

Actual result:
Instalatation failed. See logs above.

Expected result:
Installation is successful.

Not connected with TLS (Centos 7)

Version:

CentOS Linux release 7.4.1708 (Core)
mosquitto  1.4.15-2.el7
tarantool  1.9.1.72-1 or tarantool  1.7.6.25-1
tarantool/mqtt 	1.2.1 from https://raw.githubusercontent.com/tarantool/mqtt/master/rockspecs/mqtt-scm-1.rockspec

Code:

log = require('log')
mqtt = require('mqtt')

function on_message(message_id, topic, payload, gos, retain)
    log.info('New message: message_id=%s topic=%s gos=%s retain=%s payload=%s',
            message_id, topic, gos, retain, payload)
end

connection = mqtt.new("gateway_mqtt", true)
ok, err = connection:login_set('admin', 'admin')
log.info("login_set ok=%s, err=%s", ok, err)
ok, err = connection:tls_insecure_set(true)
log.info("tls_insecure_set ok=%s, err=%s", ok, err)
ok, err = connection:tls_set('ca.crt')
log.info("tls_set ok=%s, err=%s", ok, err)
ok, err = connection:connect({
        host = "127.0.0.1",
        port = 8883,
        keepalive = 60,
        log_mask=mqtt.LOG_DEBUG,
        auto_reconect = true,
    })
log.info("connect ok=%s, err=%s", ok, err)
ok, err = connection:subscribe('xxxxxx', 1)
log.info("subscribe ok=%s, err=%s", ok, err)
ok, err = connection:on_message(on_message)
log.info("on_message ok=%s, err=%s", ok, err)

log tarantool:

2018-08-23 18:33:32.938 [2982] main/101/app_mqtt I> app "app_mqtt" init
2018-08-23 18:33:32.938 [2982] main/101/app_mqtt I> login_set ok=true, err=ok
2018-08-23 18:33:32.938 [2982] main/101/app_mqtt I> tls_insecure_set ok=true, err=ok
2018-08-23 18:33:32.938 [2982] main/101/app_mqtt I> tls_set ok=true, err=ok
2018-08-23 18:33:32.938 [2982] main/108/lua I> Not connected to mqtt broker. Try connect
tarantool> 2018-08-23 18:33:32.939 [2982] main/108/lua I> connect ok=true, err=ok
2018-08-23 18:33:32.939 [2982] main/108/lua I> subscribe ok=true, err=1
2018-08-23 18:33:32.939 [2982] main/101/app_mqtt I> on_message ok=true, err=ok

log mosquitto:

1535036941: New connection from 127.0.0.1 on port 8883.

after publish message to topic 'xxxxxx'

log tarantool:

2018-08-23 18:33:32.938 [2982] main/108/lua I> Not connected to mqtt broker. Try connect
tarantool> 2018-08-23 18:33:32.939 [2982] main/108/lua I> connect ok=true, err=ok
2018-08-23 18:33:32.939 [2982] main/108/lua I> subscribe ok=true, err=1
2018-08-23 18:33:32.939 [2982] main/101/app_mqtt I> on_message ok=true, err=ok
2018-08-23 18:34:32.596 [2982] main/109/lua utils.c:923 E> LuajitError: ./.rocks/share/lua/5.1/mqtt/init.lua:93: assign to undeclared variable '_'
2018-08-23 18:34:33.033 [2982] main/108/lua I> Not connected to mqtt broker. Try connect
2018-08-23 18:34:33.034 [2982] main/108/lua I> connect ok=true, err=ok
2018-08-23 18:34:33.034 [2982] main/108/lua I> subscribe ok=true, err=2
2018-08-23 18:35:32.267 [2982] main/110/lua utils.c:923 E> LuajitError: ./.rocks/share/lua/5.1/mqtt/init.lua:93: assign to undeclared variable '_'
2018-08-23 18:35:33.110 [2982] main/108/lua I> Not connected to mqtt broker. Try connect
2018-08-23 18:35:33.111 [2982] main/108/lua I> connect ok=true, err=ok
2018-08-23 18:35:33.111 [2982] main/108/lua I> subscribe ok=true, err=3

log mosquitto:

1535036947: New connection from 10.13.0.134 on port 8883.
1535036947: New client connected from 10.13.0.134 as mosqpub|10578-xxx (c1, k60, u'admin').
1535036947: Sending CONNACK to mosqpub|10578-xxx (0, 0)
1535036947: Received PUBLISH from mosqpub|10578-xxx (d0, q1, r0, m1, 'xxxxxx', ... (2 bytes))
1535036947: Sending PUBACK to mosqpub|10578-xxx (Mid: 1)
1535036947: Received DISCONNECT from mosqpub|10578-xxx
1535036947: Client mosqpub|10578-xxx disconnected.
1535037001: Socket error on client <unknown>, disconnecting.
1535037001: New connection from 127.0.0.1 on port 8883.
1535037006: Socket error on client <unknown>, disconnecting.
1535037006: New connection from 127.0.0.1 on port 8883.
1535037066: Socket error on client <unknown>, disconnecting.
1535037066: New connection from 127.0.0.1 on port 8883.
1535037071: Socket error on client <unknown>, disconnecting.

log install tarantool/mqtt:

[app_mqtt] Installed dep: https://raw.githubusercontent.com/moonlibs/package-reload/master/package.reload-scm-1.rockspec
Using https://raw.githubusercontent.com/tarantool/mqtt/master/rockspecs/mqtt-scm-1.rockspec... switching to 'build' mode
Cloning into 'mqtt'...
remote: Counting objects: 43, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 43 (delta 4), reused 18 (delta 1), pack-reused 0
Receiving objects: 100% (43/43), 24.45 KiB | 0 bytes/s, done.
Resolving deltas: 100% (4/4), done.
-- The C compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found TARANTOOL: /usr/include (found version "1.9.1-72-gdcac64a") 
-- Tarantool LUADIR is /tmp/xxx/app_mqtt/.rocks/lib64/luarocks/rocks/mqtt/scm-1/lua
-- Tarantool LIBDIR is /tmp/xxx/app_mqtt/.rocks/lib64/luarocks/rocks/mqtt/scm-1/lib
-- Found MOSQUITTO: /usr/lib64/libmosquitto.so  
-- libmosquitto include dir: /usr/include
-- libmosquitto: /usr/lib64/libmosquitto.so
-- tarantool: /usr/include;/usr/include/tarantool
-- libmosquitto:  /usr/lib64/libmosquitto.so
-- /usr/lib64/libmosquitto.so
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks
gmake[1]: Вход в каталог `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
gmake[2]: Вход в каталог `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
gmake[3]: Вход в каталог `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
Scanning dependencies of target driver
gmake[3]: Выход из каталога `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
gmake[3]: Вход в каталог `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
[100%] Building C object mqtt/CMakeFiles/driver.dir/driver.c.o
Linking C shared library driver.so
gmake[3]: Выход из каталога `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
[100%] Built target driver
gmake[2]: Выход из каталога `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
gmake[1]: Выход из каталога `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
gmake[1]: Вход в каталог `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
gmake[2]: Вход в каталог `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
gmake[3]: Вход в каталог `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
gmake[3]: Выход из каталога `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
[100%] Built target driver
gmake[2]: Выход из каталога `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /tmp/xxx/app_mqtt/.rocks/lib64/luarocks/rocks/mqtt/scm-1/lib/mqtt/driver.so
-- Installing: /tmp/xxx/app_mqtt/.rocks/lib64/luarocks/rocks/mqtt/scm-1/lua/mqtt/init.lua
gmake[1]: Выход из каталога `/tmp/luarocks_mqtt-scm-1-3157/mqtt/build.luarocks'
Updating manifest for /tmp/xxx/app_mqtt/./.rocks/lib64/luarocks/rocks
mqtt scm-1 is now built and installed in /tmp/xxx/app_mqtt/./.rocks (license: BSD)

['luarocks', 'install', '--tree=./.rocks', 'https://raw.githubusercontent.com/tarantool/mqtt/master/rockspecs/mqtt-scm-1.rockspec'] finished
[app_mqtt] Installed dep: https://raw.githubusercontent.com/tarantool/mqtt/master/rockspecs/mqtt-scm-1.rockspec

Debian buster package is missing

curl -L https://packagecloud.io/tarantool/2x/debian/dists/stretch/main/binary-amd64/Packages.bz2 | bzcat | grep mqtt
is there, but
curl -L https://packagecloud.io/tarantool/2x/debian/dists/buster/main/binary-amd64/Packages.bz2 | bzcat | grep mqtt
is not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.