This Intelligent Transportation Systems (ITS) MQTT client based on the JSon ETSI specification transcription provides a ready to connect project for the mobility (connected and autonomous vehicles, road side units, vulnerable road users,...). Let's connect your device or application to our Intelligent Transport Systems (ITS) platform!
MIT License
7
stars
8
forks
source link
Java/iot3core: send messages to telemetry service for MQTT exchanges #181
IoT3 Core SDK:
Telemetry is now operational when publishing and receiving MQTT messages, using the OpenTelemetry client: service_name, span.status, span.name, span.kind, attributes and links are all set according to the specification (see #128).
Closes: #128
How to test
Clone the its-client project on your IDE.
Ensure that you have Gradle to be able to build the java/iot3 modules (core, mobility and examples).
Find the Iot3CoreExample class in the examples module, and set appropriate values for the following fields:
// MQTT parameters
private static final String EXAMPLE_MQTT_HOST = "mqtt_host";
private static final int EXAMPLE_MQTT_PORT_TCP = 1883;
private static final int EXAMPLE_MQTT_PORT_TLS = 8883;
private static final String EXAMPLE_MQTT_USERNAME = "mqtt_username";
private static final String EXAMPLE_MQTT_PASSWORD = "mqtt_password";
private static final String EXAMPLE_MQTT_CLIENT_ID = "mqtt_client_id";
// OpenTelemetry parameters
private static final String EXAMPLE_OTL_HOST = "telemetry_host";
private static final int EXAMPLE_OTL_PORT = 4318;
private static final String EXAMPLE_OTL_ENDPOINT = "/telemetry/endpoint";
private static final String EXAMPLE_OTL_USERNAME = "telemetry_username";
private static final String EXAMPLE_OTL_PASSWORD = "telemetry_password";
Run Iot3CoreExample.
Expected results:
On the console, you should see 3 messages being published at 2 seconds interval, on 3 different topics:
The first and third messages should be received back, while the second should not be.
In Jaeger, you should be able to find the logs of the 3 published messages, and of the 2 received messages with links to the respective published ones.
Features;
IoT3 Core SDK: Telemetry is now operational when publishing and receiving MQTT messages, using the OpenTelemetry client:
service_name
,span.status
,span.name
,span.kind
,attributes
andlinks
are all set according to the specification (see #128).Closes: #128
How to test
Iot3CoreExample
class in theexamples
module, and set appropriate values for the following fields:Iot3CoreExample
.Expected results: