siddhi-io / siddhi-io-mqtt Goto Github PK
View Code? Open in Web Editor NEWExtension that allows to receive and publish events from/to mqtt broker.
License: Apache License 2.0
Extension that allows to receive and publish events from/to mqtt broker.
License: Apache License 2.0
README.md file is not updated as per the standard.
It is better to add the io site to the extension for documentation purpose
Description:
I'm using this project's bundle (jar file) in wso2sp-worker. On startup it gives an unresolved requirement error:
org.osgi.framework.BundleException: Could not resolve module: siddhi-io-mqtt [202]
Unresolved requirement: Import-Package: io.siddhi.core.config; version="[5.0.0,6.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:444)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.startBundles(ConfigApplier.java:453)
at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:111)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:191)
at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:205)
at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:60)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
at org.eclipse.osgi.container.Module.doStart(Module.java:581)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
at org.wso2.carbon.launcher.CarbonServer.loadInitialBundles(CarbonServer.java:242)
at org.wso2.carbon.launcher.CarbonServer.start(CarbonServer.java:83)
at org.wso2.carbon.launcher.Main.main(Main.java:84)
Previously I had been using v1.1.0 which worked just fine. It's when I started using the latest(3.0.0) version, this error showed up.
Affected Product Version:
v3.0.0
Steps to reproduce:
mvn install
.mvn install
):FROM wso2/wso2sp-worker:4.4.0
ADD --chown=wso2carbon:wso2 siddhi-io-mqtt-3.0.1-SNAPSHOT.jar /home/wso2carbon/wso2sp-4.4.0/lib/siddhi-io-mqtt-3.0.1.jar
RUN chmod 664 /home/wso2carbon/wso2sp-4.4.0/lib/siddhi-io-mqtt-3.0.1.jar
Description:
MQTT Paho client has the option to enable auto reconnect in its options. It looks like this:
options.setAutomaticReconnect(true);
This is a useful feature and helps when the MQTT broker crashes or restarts. If this is not enabled, the siddhi application will not re connect to the broker unless we restart the siddhi application as well, which is inconvenient.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
3.0.0
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
I'm working on developing an edge analytics gateway and there are multiple events streams which are intended to publish events into different MQTT topics.
When using Siddhi MQTT sinks for event publishing, a sink is defined for every output stream with the relevant topic. Then, a new MQTT connection is created for each sink, that means for each event stream, new MQTT connection is created.
This can be an issue as the number of devices connected to edge gateways are increased, as there will be large number of MQTT clients which are needed to be handled by a single message broker.
The problem can be solved if there is an ability to share a single MQTT connection between multiple MQTT sinks.
Suggested Labels:
NewFeature
Description:
In the MqttSink.java[1] class,
in the connect() method (line number 205),
an instance of MqttDefaultFilePersistence is created as persistence (line number 207).
MqttDefaultFilePersistence persistence = new MqttDefaultFilePersistence(); (207)
It is passed in as the persistence argument to the MqttClient(brokerURL, clientId, persistence) constructor (line number 211).
client = new MqttClient(brokerURL, clientId, persistence); (211)
MqttDefaultFilePersistence persist data in 'user.dir'. But when these configurations are given to an Android app, the app does not have the permissions to write in that directory. As a result it gives runtime error.
When creating a new mqtt client if null is passed in as the value for the persistence argument and it has worked correctly.
MqttClient(brokerURL, clientId, null);
So if there is a parameter in Siddhi Sink to determine which value to be passed in as the persistence argument (an instance of MqttDefaultFilePersistence or null) when a new client is creating, this issue can be overcome.
Suggested Labels:
Android, Siddhi, Mqtt
OS, DB, other environment details and versions:
Android OS
Use SiddhiTestHelper.waitForEvents(sleepTime, expectedCount, actualCount, timeout) instead of Thread.sleep()
Description:
Without maven-resources-plugin the build will miss paho mqtt network services and will produce errors like: no NetworkModule installed for scheme "tcp" of URI ...
Suggested Labels:
Suggested Assignees:
Affected Product Version:
3.0.2, 3.0.3-SNAPSHOT
OS, DB, other environment details and versions:
Steps to reproduce:
Install the jar to a running siddhi instance and try to configure a mqtt source/sink
Related Issues:
Exception handling in test cases have to be improved. Currently the method signatures of some of the testcases has clause throws Exception
.
https://github.com/siddhi-io/siddhi-io-mqtt/blob/master/component/src/main/java/io/siddhi/extension/io/mqtt/source/MqttConsumer.java#L52
it,s not working when I set the topic parameter as this '/mqtt/topic1,/mqtt/topic2'. It seems topic parameters do not support subscription to multiple topics. It is necessary to separate the topic into multiple topics according to the comma when parsing the topic parameter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.