#sdk #iot #astarte

bin+lib astarte-message-hub

A central service that runs on (Linux) devices for collecting and delivering messages from N apps using 1 MQTT connection to Astarte

2 releases

0.5.2 Jul 3, 2023
0.5.1 Apr 26, 2023
0.5.0-alpha.1 Apr 26, 2023
0.1.0 Apr 21, 2023

#83 in #iot

Download history 68/week @ 2023-07-21 36/week @ 2023-07-28 102/week @ 2023-08-04 43/week @ 2023-08-11 18/week @ 2023-08-18 22/week @ 2023-08-25 13/week @ 2023-09-01 19/week @ 2023-09-08 28/week @ 2023-09-15 73/week @ 2023-09-22 58/week @ 2023-09-29 31/week @ 2023-10-06 35/week @ 2023-10-13 44/week @ 2023-10-20 188/week @ 2023-10-27 109/week @ 2023-11-03

376 downloads per month

Apache-2.0

205KB
4K SLoC

Astarte Message Hub

Crates.io docs.rs CI codecov LICENSE

A central service that runs on (Linux) devices for collecting and delivering messages from N apps using 1 MQTT connection to Astarte.

Documentation

Requirements

  • protobuf >= 3.15
  • Rust version >= 1.59

Configuration

The Astarte Message Hub is configured through message-hub-config.toml in the current working directory, otherwise the system wide /etc/message-hub/config.toml can be used. In alternative, you can specify the path to the configuration file with the -t/--toml cli option.

The format for the configuration file is the following:

##
# Required fields
#
realm = "<REALM>"
pairing_url = "<PAIRING_URL>"
grpc_socket_port = 0 # Required, 0 is only a placeholder

##
# Optional fields
#
interfaces_directory = "[INTERFACES_DIRECTORY]"
# Device id, if not provided it will be retrieved from `io.edgehog.Device` dbus-service
device_id = "[DEVICE_ID]"
# Used to register a device and obtain a `credentials_secret`
pairing_token = "[PAIRING_TOKEN]"
# Credential secret, if not provided the `pairing_token` is required
credentials_secret = "[CREDENTIALS_SECRET]"
# Ignore SSL errors, defaults to false
astarte_ignore_ssl = false
# Path to store persistent data, defaults to "./"
store_directory = "<STORE_PAHT>"

An example configuration file can be found in the examples direction.

Example

Have a look at the examples for an usage example showing how to send and receive data.

Dependencies

~56–76MB
~1.5M SLoC