Git Product home page Git Product logo

mqtt-connector's People

Contributors

alexellis avatar dependabot[bot] avatar shikachuu avatar viveksyngh avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

mqtt-connector's Issues

Question - is there multiple topic support?

My actions before raising this issue

Expected Behaviour

This connector cannot deal with more than one MQTT topic, as stated in https://github.com/openfaas/mqtt-connector/tree/master/chart/mqtt-connector and confirmed by my own tests with the connector. This seems normal as only one MQTT subscription is created. I'm wondering why this connector is limited to one single topic per instance.

Current Behaviour

Only one topic is allowed. If more than one topic are used (e.g. my-topic,my-second-topic), no errors are thrown but only the first topic seems to be used. Only messages published to the first topic my-topic will be received by the connector.

Possible Solution

I've added very simple multi-topic support using multiple subscriptions, but maybe I'm missing how the connector-sdk handles/splits the topic internally.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
    commit: c12d57c39ac4cc6eef3c9bba2fb45113d882432f
    version: 0.12.14

  • Docker version docker version (e.g. Docker 17.0.05 ): Docker 19.03.12

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)? No

  • Operating System and version (e.g. Linux, Windows, MacOS): Linux

Upgrade to Go 1.18

Expected Behaviour

Upgrade to Go 1.18 in GitHub Actions and Dockerfile

Current Behaviour

Currently on Go 1.15

qos set to 1 is invalid

Is it possible to set the "qos:1" and "clean:true" attributes in value.yaml?
I don't know go language,help

I was not able to receive my "received_image.jpg" image inside the pod

My actions before raising this issue

Published an image in to "/testmqtt/pushimage1" MQTT topic
It will trigger another function "mqttsubscribeimage"

Expected Behaviour

"received_image.jpg" should be expected inside the pod

Current Behaviour

Not able to find the "received_image.jpg".

Steps to Reproduce (for bugs)

mqttsubscribeimage function handler code (handler.py) (python3-flask-debian docker file used)
.........................................................................................

from PIL import Image
import io
import json
import os
import uuid
import time
import paho.mqtt.client as mqtt

def on_message(client, userdata, message):

open('received_image.jpg','wb').write(message.payload)

def handle(req):

client = mqtt.Client("ipaddress_of_my_system:1883", transport="tcp")

broker = "ipaddress_of_my_system"
port = 1883

client.connect(broker, port)


print("connected to broker")
client.loop_start() 

client.subscribe("/testmqtt/pushimage1")   

client.on_message = on_message


time.sleep(1000)
client.loop_forever()
return req

requirements.txt file
.......................................................
paho-mqtt
pillow==7.0.0

In mqttsubscribeimage function logs
..................................................................................
I can see only --> POST / - 200 OK - ContentLength: 50223

Your Environment

Running inside Minikube

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.