Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
mkdir test-results
find . -type d -name "*surefire*" -exec cp --parents -R {} test-results/ \;
zip -r test-results.zip test-results
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: upload test-results
if: failure()
with:
Expand Down
5 changes: 5 additions & 0 deletions benchmark-framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
<artifactId>driver-kop</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>driver-mqtt5</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>driver-nats</artifactId>
Expand Down
27 changes: 27 additions & 0 deletions driver-mqtt5/mqtt5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: MQTT
driverClass: io.openmessaging.benchmark.driver.mqtt5.MqttBenchmarkDriver

client:
serverUri: tcp://localhost:1883
username:
password:
topicPrefix: benchmark

consumer:
cleanSession: true
sessionExpiryIntervalSeconds: 259200
receiveMaximum: 256
49 changes: 49 additions & 0 deletions driver-mqtt5/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.openmessaging.benchmark</groupId>
<artifactId>messaging-benchmark</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>

<artifactId>driver-mqtt5</artifactId>

<properties>
<hive.mqtt.client.verson>1.3.8</hive.mqtt.client.verson>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>driver-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.hivemq</groupId>
<artifactId>hivemq-mqtt-client</artifactId>
<version>${hive.mqtt.client.verson}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openmessaging.benchmark.driver.mqtt5;


import com.hivemq.client.mqtt.mqtt5.Mqtt5AsyncClient;
import io.openmessaging.benchmark.driver.BenchmarkConsumer;

public class MqttBenchmarkConsumer implements BenchmarkConsumer {
private Mqtt5AsyncClient client;
private volatile boolean closed = false;

public MqttBenchmarkConsumer() {}

@Override
public void close() throws Exception {
MqttBenchmarkDriver.closeClient(client);
closed = true;
}

public void setClient(Mqtt5AsyncClient client) {
this.client = client;
}

public boolean isClosed() {
return closed;
}
}
Loading