Giter Club home page Giter Club logo

siddhi-io-mqtt's Introduction

Siddhi IO MQTT

Jenkins Build Status GitHub Release GitHub Release Date GitHub Open Issues GitHub Last Commit License

The siddhi-io-mqtt is an extension to Siddhi mqtt source and sink implementation,that publish and receive events from mqtt broker.

For information on Siddhi and it's features refer Siddhi Documentation.

Downloads

  • Versions 3.x and above with group id io.siddhi.extension.* from here.
  • Versions 2.x and lower with group id org.wso2.extension.siddhi. from here.

Latest API Docs

Latest API Docs is 3.0.2.

Features

  • mqtt (Sink)

    The MQTT sink publishes the events to an MQTT broker

  • mqtt (Source)

    The MQTT source receives the events from an MQTT broker

Dependencies

There are no other dependencies needed for this extension.

Installation

For installing this extension on various siddhi execution environments refer Siddhi documentation section on adding extensions.

Support and Contribution

  • We encourage users to ask questions and get support via StackOverflow, make sure to add the siddhi tag to the issue for better response.
  • If you find any issues related to the extension please report them on the issue tracker.
  • For production support and other contribution related information refer Siddhi Community documentation.

siddhi-io-mqtt's People

Contributors

ajanthy avatar anoukh avatar anugayan avatar chathurikaa avatar dependabot[bot] avatar dilini-muthumala avatar dnwick avatar gimantha avatar gokul avatar grainier avatar hamsav avatar maheshika avatar mayuravaani avatar minudika avatar mohanvive avatar nirmal070125 avatar nisalaniroshana avatar niveathika avatar pcnfernando avatar ramindu90 avatar rolandhewage avatar rukshiw avatar sajithshn avatar suhothayan avatar tishan89 avatar wso2-jenkins-bot avatar

Stargazers

 avatar  avatar

Watchers

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

siddhi-io-mqtt's Issues

Single MQTT connection for multiple clients

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

Enable Auto Reconnect In MQTT

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:

Fix exception handling in testcases

Exception handling in test cases have to be improved. Currently the method signatures of some of the testcases has clause throws Exception.

Persistence Implementation when creating a mqtt client

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

v3.0.0 giving Unresolved requirement: Import Package Error on Runtime in wso2sp-worker

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:

  1. Build the project using mvn install.
  2. Build the following DockerFile (just adding the snapshot jar file created as a result of 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
  1. docker run -it <image_name>

Missing maven-resources-plugin

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:

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.