tenthe commented on code in PR #3934:
URL: https://github.com/apache/streampipes/pull/3934#discussion_r2555054255
##########
streampipes-extensions/streampipes-sinks-brokers-jvm/pom.xml:
##########
@@ -64,10 +64,10 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
</dependency>
- <dependency>
- <groupId>org.fusesource.mqtt-client</groupId>
- <artifactId>mqtt-client</artifactId>
- </dependency>
+ <dependency>
+ <groupId>com.hivemq</groupId>
+ <artifactId>hivemq-mqtt-client</artifactId>
+</dependency>
Review Comment:
Please check the formatting of the pom file
##########
pom.xml:
##########
@@ -1049,6 +1056,12 @@
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.jetbrains</groupId>
Review Comment:
Do we still need this dependecy?
##########
streampipes-extensions/streampipes-connectors-mqtt/pom.xml:
##########
@@ -44,10 +44,10 @@
<version>0.99.0-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.fusesource.mqtt-client</groupId>
- <artifactId>mqtt-client</artifactId>
- </dependency>
+ <dependency>
Review Comment:
Please check the formatting of the pom file
##########
streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.oi4/strings.en:
##########
@@ -34,7 +34,7 @@ username-group.description=
username.title=Username
username.description=
-client-cert-alternative.title=Client Certificate
+client-cert-alternative.title= Client Certificate
Review Comment:
```suggestion
client-cert-alternative.title=Client Certificate
```
##########
streampipes-messaging-mqtt/pom.xml:
##########
@@ -35,11 +35,11 @@
</dependency>
<!-- External dependencies -->
- <dependency>
- <groupId>org.fusesource.mqtt-client</groupId>
- <artifactId>mqtt-client</artifactId>
- </dependency>
- <dependency>
+ <dependency>
+ <groupId>com.hivemq</groupId>
+ <artifactId>hivemq-mqtt-client</artifactId>
+</dependency>
Review Comment:
Please check the formatting of th pom.xml file
##########
streampipes-extensions/streampipes-connectors-mqtt/src/main/resources/org.apache.streampipes.sinks.brokers.jvm.mqtt/strings.en:
##########
@@ -48,7 +48,7 @@ username-alternative.description=
username-group.title=User Group
username-group.description=
-client-cert-alternative.title=Client Certificate
+client-cert-alternative.title= Client Certificate
Review Comment:
```suggestion
client-cert-alternative.title=Client Certificate
```
##########
streampipes-extensions/streampipes-connectors-mqtt/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.mqtt/strings.en:
##########
@@ -31,7 +31,7 @@ username-alternative.description=
username-group.title=User Group
username-group.description=
-client-cert-alternative.title=Client Certificate
+client-cert-alternative.title= Client Certificate
Review Comment:
```suggestion
client-cert-alternative.title=Client Certificate
```
##########
streampipes-messaging-mqtt/src/main/java/org/apache/streampipes/messaging/mqtt/MqttConsumer.java:
##########
@@ -17,81 +17,87 @@
*/
package org.apache.streampipes.messaging.mqtt;
+
import org.apache.streampipes.commons.exceptions.SpRuntimeException;
import org.apache.streampipes.messaging.EventConsumer;
import org.apache.streampipes.messaging.InternalEventProcessor;
import org.apache.streampipes.model.grounding.MqttTransportProtocol;
-import org.fusesource.mqtt.client.Message;
-import org.fusesource.mqtt.client.QoS;
-import org.fusesource.mqtt.client.Topic;
+import com.hivemq.client.mqtt.datatypes.MqttQos;
+import com.hivemq.client.mqtt.mqtt3.message.publish.Mqtt3Publish;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import java.io.Serializable;
public class MqttConsumer extends AbstractMqttConnector implements
- EventConsumer,
- AutoCloseable, Serializable {
+ EventConsumer,
+ AutoCloseable,
+ Serializable {
- public MqttConsumer(MqttTransportProtocol protocol) {
- super(protocol);
- }
+ protected final MqttTransportProtocol protocol;
+ private static final Logger LOG =
LoggerFactory.getLogger(MqttConsumer.class);
- @Override
- public void connect(InternalEventProcessor<byte[]> eventProcessor)
- throws SpRuntimeException {
+ public MqttConsumer(MqttTransportProtocol protocol) {
+ super(protocol);
+ this.protocol = protocol;
+ }
- try {
- this.createBrokerConnection(protocol);
- Topic[] topics = {new
Topic(protocol.getTopicDefinition().getActualTopicName(), QoS.AT_LEAST_ONCE)};
- connection.subscribe(topics);
- new Thread(new ConsumerThread(eventProcessor)).start();
+ @Override
+ public void connect(InternalEventProcessor<byte[]> eventProcessor) throws
SpRuntimeException {
+ try {
- } catch (Exception e) {
- throw new SpRuntimeException(e);
- }
- }
+ LOG.info("Call to create Broker COmnmection from Messaging");
Review Comment:
```suggestion
LOG.info("Call to create Broker Connection from Messaging");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]