From ca4e9eae84c6bef254c41fbbeaaf1d91d7fb4c4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 08:01:34 +0000 Subject: [PATCH 01/11] Bump maven-compiler-plugin from 3.8.0 to 3.10.1 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.8.0 to 3.10.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.8.0...maven-compiler-plugin-3.10.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff8cb19..189f620 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.0 + 3.10.1 11 11 From 6620be74e683a5a89ccdae296f91ddb9e7c64687 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 08:01:38 +0000 Subject: [PATCH 02/11] Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-and-build.yml b/.github/workflows/test-and-build.yml index 025440f..66a8a41 100644 --- a/.github/workflows/test-and-build.yml +++ b/.github/workflows/test-and-build.yml @@ -6,7 +6,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up JDK 11 uses: actions/setup-java@v3 with: @@ -28,7 +28,7 @@ jobs: # Run only on develop branch if: github.ref == 'refs/heads/develop' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Download .jar file uses: actions/download-artifact@v2 with: @@ -47,7 +47,7 @@ jobs: # Run only for tagged commits if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Download .jar file uses: actions/download-artifact@v2 with: From 308c59f47a5919fba73eafe4f7dde29ec2304d45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 08:01:38 +0000 Subject: [PATCH 03/11] Bump maven-shade-plugin from 3.2.1 to 3.4.0 Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.2.1 to 3.4.0. - [Release notes](https://github.com/apache/maven-shade-plugin/releases) - [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.2.1...maven-shade-plugin-3.4.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-shade-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff8cb19..d6283ff 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.1 + 3.4.0 From c60597b143f3835c7b00cab9de8a0ba6ef4dbd8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 08:01:42 +0000 Subject: [PATCH 04/11] Bump actions/download-artifact from 2 to 3 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-and-build.yml b/.github/workflows/test-and-build.yml index 025440f..e73e6df 100644 --- a/.github/workflows/test-and-build.yml +++ b/.github/workflows/test-and-build.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Download .jar file - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: pulsar-mqtt-gateway.jar path: target @@ -49,7 +49,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Download .jar file - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: pulsar-mqtt-gateway.jar path: target From 6f905e1f1623dc087aaa995c6a47f0b7f5d5dfa3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Oct 2022 04:12:29 +0000 Subject: [PATCH 05/11] Bump actions/upload-artifact from 2 to 3 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/test-and-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-build.yml b/.github/workflows/test-and-build.yml index c74b882..123afa0 100644 --- a/.github/workflows/test-and-build.yml +++ b/.github/workflows/test-and-build.yml @@ -18,7 +18,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload .jar file - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: pulsar-mqtt-gateway.jar path: target/pulsar-mqtt-gateway.jar From d95b948543d3b39c2f28ee8233c8b5a9821a08b2 Mon Sep 17 00:00:00 2001 From: Jaakko Malkki <32361480+mjaakko@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:26:34 +0200 Subject: [PATCH 06/11] Update common version to 1.5.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f204075..c04fdaf 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ UTF-8 11 11 - 1.3.29 + 1.5.2 1.2.5 From 2f8c8645af6fa4343d70a8e820b22751b6b5bde7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Apr 2023 07:09:01 +0000 Subject: [PATCH 07/11] Bump maven-shade-plugin from 3.4.0 to 3.4.1 Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/apache/maven-shade-plugin/releases) - [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.4.0...maven-shade-plugin-3.4.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-shade-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c04fdaf..024ed26 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.4.0 + 3.4.1 From 12a3e2670ddcd063916b41486bac28bc27059578 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Apr 2023 07:09:16 +0000 Subject: [PATCH 08/11] Bump maven-compiler-plugin from 3.10.1 to 3.11.0 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c04fdaf..2e2c59c 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.11.0 11 11 From b79cc814e6be58fba84ba3db00363b18bfc3bf7b Mon Sep 17 00:00:00 2001 From: Jaakko Malkki <32361480+mjaakko@users.noreply.github.com> Date: Thu, 27 Apr 2023 11:00:32 +0300 Subject: [PATCH 09/11] Update README.md --- README.md | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index c548fc2..db37826 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# pulsar-mqtt-gateway [![Test and create Docker image](https://github.com/HSLdevcom/pulsar-mqtt-gateway/actions/workflows/test-and-build.yml/badge.svg)](https://github.com/HSLdevcom/pulsar-mqtt-gateway/actions/workflows/test-and-build.yml) + ## Description Application for publishing Pulsar messages to MQTT. The application doesn't care about @@ -9,13 +11,13 @@ the data content, it only publishes the binary message as-is. This project depends on [transitdata-common](https://github.com/HSLdevcom/transitdata-common) project. -Either use released versions from public maven repository or build your own and install to local maven repository: - - ```cd transitdata-common && mvn install``` +Either use released versions from the public GitHub Packages repository (Maven) or build your own and install to local Maven repository: +- `cd transitdata-common && mvn install` ### Locally -- ```mvn compile``` -- ```mvn package``` +- `mvn compile` +- `mvn package` ### Docker image @@ -24,22 +26,19 @@ Either use released versions from public maven repository or build your own and ## Running -Requirements: -- Pulsar Cluster - - By default uses localhost, override host in PULSAR_HOST if needed. - - Tip: f.ex if running inside Docker in OSX set `PULSAR_HOST=host.docker.internal` to connect to the parent machine - - You can use [this script](https://github.com/HSLdevcom/transitdata/blob/master/bin/pulsar/pulsar-up.sh) to launch it as Docker container -- Connection to an external MQTT server. - - Configure username and password via files - - Set filepath for username via env variable FILEPATH_USERNAME_SECRET, default is `/run/secrets/mqtt_broker_username` - - Set filepath for password via env variable FILEPATH_PASSWORD_SECRET, default is `/run/secrets/mqtt_broker_password` - - Mandatory: Set mqtt-topic via env variable MQTT_TOPIC - - -All other configuration options are configured in the [config file](src/main/resources/environment.conf) -which can also be configured externally via env variable CONFIG_PATH +### Dependencies -Launch Docker container with +* Pulsar +* Connection to a MQTT broker -```docker-compose -f compose-config-file.yml up ``` +### Environment variables +* `MQTT_HAS_AUTHENTICATION`: whether the MQTT broker uses authentication +* `FILEPATH_USERNAME_SECRET`: path to the file containing the username, default is `/run/secrets/mqtt_broker_username` +* `FILEPATH_PASSWORD_SECRET`: path to the file containing the password, default is `/run/secrets/mqtt_broker_password` +* `MQTT_BROKER_HOST`: URL of the MQTT broker +* `MQTT_TOPIC`: MQTT topic where to publish messages +* `MQTT_MAX_INFLIGHT`: maximum amount of MQTT messages in-flight +* `MQTT_CLIENT_ID`: MQTT client ID +* `MQTT_RETAIN_MESSAGE`: whether to send MQTT messages with retained flag +* `MQTT_KEEP_ALIVE_INTERVAL`: interval for MQTT keep-alive, in seconds From 1f2df278b1eecc927c4c23a42508da03dd5e5f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20J=C3=A4rvinen?= Date: Mon, 3 Jun 2024 17:29:22 +0300 Subject: [PATCH 10/11] Complete migration to Java 11 and Temurin based Docker image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bde91d3..68ff827 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,4 +3,4 @@ FROM eclipse-temurin:11-alpine RUN apk add --no-cache curl ADD target/pulsar-mqtt-gateway.jar /usr/app/pulsar-mqtt-gateway.jar -ENTRYPOINT ["java", "-jar", "/usr/app/pulsar-mqtt-gateway.jar"] +ENTRYPOINT ["java", "-XX:InitialRAMPercentage=10.0", "-XX:MaxRAMPercentage=95.0", "-jar", "/usr/app/pulsar-mqtt-gateway.jar"] From 2b7ceb19346a965bea5c19e52f3995ca7f7358c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20J=C3=A4rvinen?= Date: Mon, 3 Jun 2024 17:36:21 +0300 Subject: [PATCH 11/11] Common dependency version updated to 1.5.4 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 26582f7..4600ca6 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ UTF-8 11 11 - 1.5.2 + 1.5.4 1.2.5