Git Product home page Git Product logo

hivemq-sparkplug-aware-extension's Introduction

HiveMQ Sparkplug Aware Extension

Extension Type GitHub release (latest by date) GitHub GitHub Workflow Status

Purpose

This HiveMQ Sparkplug aware extension has the purpose to fulfil the new Sparkplug Release of the Sparkplug specification extend HiveMQ with the functionality of a Sparkplug Aware Broker wich is an optional Requirement.

This includes on top of providing the necessary native HiveMQ MQTT features like Retained Message handling and all QoS levels the following

REQUIREMENTS:

  • A Sparkplug Aware MQTT Server MUST store NBIRTH and DBIRTH messages as they pass through the MQTT Server

  • A Sparkplug Aware MQTT Server MUST make NBIRTH messages available on a topic of the form: $sparkplug/certificates/namespace/group_id/NBIRTH/edge_node_id

  • A Sparkplug Aware MQTT Server MUST make NBIRTH messages available on the topic: $sparkplug/certificates/namespace/group_id/NBIRTH/edge_node_id with the MQTT retain flag set to true

  • A Sparkplug Aware MQTT Server MUST make DBIRTH messages available on a topic of the form: $sparkplug/certificates/namespace/group_id/DBIRTH/edge_node_id/device_id

  • A Sparkplug Aware MQTT Server MUST make DBIRTH messages available on this topic with the MQTT retain flag set to true

  • A Sparkplug Aware MQTT Server MAY replace the timestamp of NDEATH messages. If it does, it MUST set the timestamp to the UTC time at which it attempts to deliver the NDEATH to subscribed client.

Configuration

The Extension expects the configuration file conf/sparkplug.properties in the extension home folder. This configuration file contains a set of properties to align the behavior of the extension.

The topic structure root for the systopic, and the sparkplug version can be configured. Compression is switched of by default. An optional log output of the payload in formatted JSON can be configured. The JSON is available from a separate logger. The Message Expiry of the retained messages send to the systopic can be configured to a smaller lifetime. If not set, the standard expiration of 4.294.967.296 seconds for a message is used.

Default properties are:

sparkplug.version=spBv1.0
sparkplug.systopic=$sparkplug/certificates/
sparkplug.compression=false
sparkplug.json.log=false
sparkplug.systopic.msgExpiry=4294967296

JSON Logging configuration

When using logger sparkplug.json.log, add the configuration settings appender and logger from the src/hivemq-extension/conf/logback-example.xml file to your hivemq/conf/logback.xml configuration. With this, the sparkplug payload will be written as json into the separate file hivemq/log/sparkplug-json-payload.log.

Installation

  1. Clone this repository into a Java 11 Gradle project.

  2. Execute the Gradle task hivemqExtensionZip to build the extension.

  3. Move the file: build/hivemq-extension/hivemq-sparkplug-aware-extension-4.X.X.zip to the directory: HIVEMQ_HOME/extensions

  4. Unzip the file.

  5. Start HiveMQ.

Contributing

If you want to contribute to HiveMQ Sparkplug Aware Extension, see the contribution guidelines.

License

HiveMQ Sparkplug Aware Extension is licensed under the APACHE LICENSE, VERSION 2.0. A copy of the license can be found here.

hivemq-sparkplug-aware-extension's People

Contributors

donnerbart avatar jerady avatar renovate[bot] avatar sgtsilvio avatar skobow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

Forkers

perfect404

hivemq-sparkplug-aware-extension's Issues

Metrics to Topic Fanout

This feature enables re-publishing metrics of Sparkplug Data messages to dedicated topics.

When receiving a data message on spBv1.0/DairyPlant/NDATA/Refrigeration each metric will be republished on a corresponding topic:

{
        "timestamp": 1486144502122,
        "metrics": [{
            "name": "Inputs/Temperature",
            "timestamp": 1486144502122,
            "dataType": "Float",
            "value": 29.2
}, {
            "name": "Inputs/Humidity",
            "timestamp": 1486144502122,
            "dataType": "Float",
            "value": 55.9
}],
    "seq": 0
}

The first metric will be published on spBv1.0/DairyPlant/NDATA/Refrigeration/Inputs/Temperature:

{
            "name": "Inputs/Temperature",
            "timestamp": 1486144502122,
            "dataType": "Float",
            "value": 29.2
}

The second metric will be published on: spBv1.0/DairyPlant/NDATA/Refrigeration/Inputs/Humidity

{
            "name": "Inputs/Humidity",
            "timestamp": 1486144502122,
            "dataType": "Float",
            "value": 55.9
}

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Pending Approval

These branches will be created by Renovate only once you click their checkbox below.

  • Update all major dependencies (major) (com.google.protobuf:protobuf-java, com.google.guava:guava)

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/gradle-build.yml
  • actions/checkout v3
  • actions/cache v3.3.3
  • actions/setup-java v4.2.1@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
.github/workflows/gradle-release.yml
  • actions/checkout v4
  • actions/setup-java v4.2.1@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9
  • gradle/gradle-build-action v3.3.2@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff
  • softprops/action-gh-release v1
gradle
gradle.properties
settings.gradle.kts
build.gradle.kts
gradle/libs.versions.toml
  • org.apache.commons:commons-lang3 3.8.1
  • com.google.guava:guava 31.1-jre
  • com.fasterxml.jackson.core:jackson-core 2.13.2
  • com.fasterxml.jackson.core:jackson-databind 2.13.2
  • org.codehaus.jackson:jackson-mapper-asl 1.9.13
  • org.jetbrains:annotations 24.0.1
  • org.mockito:mockito-core 5.6.0
  • com.google.protobuf:protobuf-java 3.17.3
  • org.eclipse.tahu:tahu-core 1.0.0
  • com.hivemq.extension 3.1.0
  • io.github.sgtsilvio.gradle.defaults 0.2.0
  • com.github.hierynomus.license 0.16.1
  • org.gradle.crypto.checksum 1.4.0
  • net.researchgate.release 3.0.2

  • Check this box to trigger a request for Renovate to run again on this repository

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.