21 releases (10 stable)

2.0.0 Feb 27, 2025
1.5.0 Aug 8, 2023
1.4.0 Mar 24, 2023
1.3.1 Mar 6, 2025
0.1.1 Jul 15, 2021

#397 in Network programming

Download history 50/week @ 2024-12-06 2/week @ 2024-12-13

1,107 downloads per month
Used in 2 crates

MIT license

405KB
11K SLoC

libits-client

Build Status crates.io

This crate provides IoT3 MQTT and OpenTelemetry generic clients and, on top of this an ETSI Intelligent Transport System messages implementation using JSON

Examples

json_counter

Demonstrates how to use the IoT3 message exchange feature.

Subscribes to test.mosquitto.org and yields how much messages were received and the number of them whose payload is in JSON.

cargo run --example json_counter

Logs are redirected to a file

tail -F log/json_counter_rCURRENT.log

telemetry

This example describes how to send OpenTelemetry traces and how to transmit W3C context to link spans between traces.

We don't expose any public OTLP collector (yet?), so you either have to:

  • use one of your own already available or
  • spawn one
    docker run --rm --name jaeger \
        -p 16686:16686 \
        -p 4318:4318 \
    jaegertracing/all-in-one:1.58
    

In any case, before running the example, you must edit the [telemetry] section of configuration with the proper values.
Then you can run the example:

cargo run --example telemetry --features telemetry

copycat

Subscribes to ITS CAM and CPM messages, stores them and sends a copy 3 seconds later.

cargo run --example copycat --features geo_routing

If the telemetry features is enabled both message reception and publish are traced (it requires an OTLP collector as mentioned in the telemetry example section).

cargo run --example copycat --features geo_routing --features telemetry

Note: this example does not send any message so it has to be used with a sender example from the python implementation to work relevantly

Dependencies

~19–32MB
~485K SLoC