by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 11 09:13
    robertsLando closed #813
  • Feb 11 09:13
    robertsLando commented #813
  • Feb 11 09:08
    Pakkes labeled #813
  • Feb 11 09:08
    Pakkes opened #813
  • Jan 31 18:27
    JohnRoesler opened #812
  • Jan 23 15:28
    robertsLando commented #811
  • Jan 23 15:27
    robertsLando commented #811
  • Jan 23 15:24

    mcollina on master

    Unmaintained redirect to aedes Merge pull request #811 from mo… (compare)

  • Jan 23 15:24
    mcollina closed #811
  • Jan 23 15:05
    robertsLando opened #811
  • Jan 23 15:05

    robertsLando on robertsLando-patch-1

    Unmaintained redirect to aedes (compare)

  • Jan 20 22:08
    mcollina added as member
  • Jan 17 23:15
    lightsofapollo closed #755
  • Jan 17 18:06
    dash8x edited #810
  • Jan 17 18:06
    dash8x opened #810
  • Jan 14 20:44
    jhalag commented #755
  • Jan 14 20:41
    jhalag commented #755
  • Jan 08 21:42
    Reda1000 commented #802
  • Jan 08 14:51
    kocil commented #802
  • Jan 01 02:56
    Reda1000 commented #802
Matteo Collina
@mcollina
or something very similar
Emiliano Bonassi
@emilianobonassi
@mcollina thanks.
Chad Cravens
@ccravens
Hey guys, so I had a quick question regarding Mosca's behavior Im seeing
when I subscribe to a topic, I notice that the subscription seems to disconnect/reconnect after 1 minute
is there any way to prevent this behavior?
Chad Cravens
@ccravens
So to answer my previous question, we were able to stop the disconnect/reconnect by creating a setInterval() for every 30 s that wrote a small message
not sure if it's ideal, but it has accomplished what we want
Matteo Collina
@mcollina
no idea, sorry
V
@Tyrix
Hi, I want to use mosca with mqtt.js and replace socket.io for my frontend webapplication. I just want to push real time data to the client browsers over secure websockets. Do I need to change the config, so no other external client can connect and publish messages?
Matteo Collina
@mcollina
Yes you have to change the config
Emiliano Bonassi
@emilianobonassi
What do you suggest for using broker behind a web proxy (HTTP+WebSocket) which supports most of the browsers/evil proxies?
For example, socket-io/sockjs which uses an mqtt client to connect to a mosca/aedes broker.
Fernando
@flachica
I am trying to connect from a javascript client to a Mosca Broker with SSL but Firefox can not connect. Has anyone made a client with MQTT.js and SSL? https://stackoverflow.com/questions/48466884/mqtt-js-with-ssl-could-not-connect?stw=2
Navjot Dhanawat
@navjotdhanawat
Hi @mcollina , I found mosca a nodejs based mqtt broker. Is it production ready and what about performance?
Ghost
@ghost~5a93cd8cd73408ce4f8ed969
hello @mcollina
err msg is 'stream.js:74 WebSocket connection to 'ws://localhost:9800/' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received' when I use chrome connect my mqtt server, @mcollina
Kasun Vithanage
@kasvith
@mcollina hi, i am doing a project to develop a realtime patients monitoring system for hospitals. I ve provided a mechanism to admins of site to authorize or blacklist a device in my application backend. So when a device wants to connect it sends MAC address to a specific endpoint and admin can authorize it and assign it to a bed, when a patient admit, the device will get the topic like ward/1/patient/112 from the application endpoint with same above endpoint. Then i need to authorize the client in mqtt procedure, it can be also done with the credential system you provide with Mosca, the real problem comes when i need to dump data to database realtime and display them to doctors who has been logged, so as you said it uses a mongo backend, where i use to store data too, can i directly dump that data to my original database without subscribing my application server to mosca? i can subscribe for emitting data realtime to frontend...also in this scenario should i integrate mosca directly to my express app or create my custom server with mosca and subscribe my app server as a client for get ward data ? any help appreciated....my concern is the message handler in application may not be able to handle a large load
i ve read HiveMQ MQTT essentials and saw there that for handle something like this they recommend to write a plugin to HiveMQ broker
Matteo Collina
@mcollina
You can do the same for Mosca
listen to the ‘published’ event.
Also, I’d recommend to use https://www.npmjs.com/package/aedes
Kasun Vithanage
@kasvith

im using MQTT.js with mosca
i ve set username authentication in mosca and from mqttjs i want to set username
so i ve done with as in examples
mosca recives it and
authenticate the client correctly
but MQTT.js client keep saying Bad username and password
'use strict'

const config = require('../config')
const mqtt = require('mqtt')
const client = mqtt.connect(config.mqtt, { username: 'RPMS_SERVER', password: 'none' })

lucassalazar
@lucassalazar

Hello everyone, I've been trying to setup Ponte for accepting https requests, can someone help me?

My Ponte code:
var ponte = require("ponte");

var SECURE_KEY = dirname + '/MyKey.key';
var SECURE_CERT =
dirname + '/MyCert.crt';

var opts = {
id:'myPonte',
logger: {
name: 'PonteBroker',
level: 'info'
},
http: {
secure : {
port: 3001,
keyPath: SECURE_KEY,
certPath: SECURE_CERT,
},

},
mqtt: {
secure : {
port: 8443,
keyPath: SECURE_KEY,
certPath: SECURE_CERT,
},
},
persistence: {
type: "mongo",
url: "mongodb://localhost:27017/ponte"
},
};
var server = ponte(opts);

server.on('clientConnected', function(client) {
console.log('client connected', client.id);
});

server.on("updated", function(resource, buffer) {
console.log("Resource Updated", resource, buffer);
});

The TLS configuration for MQTT is working, but don't seems to work with HTTP.

Manoj Kumar
@manoj6932
Hi I'm new to Node JS. I'm Running mosca Server, The server is closed after 3 Hrs. How to Maintain the Server connection always???
Fernando
@flachica
Hello, I'm looking for a Cordova plugin that allows me to connect to a Mosca broker from an application made with Cordova. I want to build a push notifications server. Do you know any that work for Android?
Fernando
@flachica
I looking for something like this https://github.com/mapon-com/cordova-socket-messaging-plugin but for a Mosca broker
stherrienaspnet
@stherrienaspnet
Hello I have an issue when executing server.close() throw new Error("This ascoltatore is closed");
stherrienaspnet
@stherrienaspnet
this part is always executed when calling server.close()
AbstractAscoltatore.prototype._raiseIfClosed = function raiseIfClosed() {
  if (this._closed) {
    throw new Error("This ascoltatore is closed");
  }
};
stherrienaspnet
@stherrienaspnet
This is closing really well using plain javascript, this is a Typescript usage issue, will find it
stherrienaspnet
@stherrienaspnet
I have resolve my issue with typescript
Nissim Kurle
@nissim-kurle
Can someone please help me with this.
disgra
@peterpalace
Hi everyone! I'm trying to get the list of all topics from a private mosca broker. @mcollina do you know the correct way to achieve this? Is it possible for the broker to know all the topics? any help is really appreciated..Cheers
Xaree Lee
@xareelee
Hello, is there any example for MQTT (mosca) over WebSocket and TSL/SSL?
I can connect my browser (webpage) to the mosca server with MQTT over WebSocket, but failed with TSL/SSL.
or any tutorial?
Matthias Kallenbach
@seekwhencer
mosca with redis on a raspberry pi ;) works great!
jack
@jack0320
I got a problem in mosca https usage, my setting is :
var SECURE_KEY = './pem/https/server.key';
var SECURE_CERT = './pem/https/server.crt';
var moscaSettings ={
interfaces:[
{type: "https", port: config.mqh_port, credentials:{keyPath: SECURE_KEY,certPath: SECURE_CERT}},
{type: "mqtts", port: config.mqc_port, credentials:{keyPath: SECURE_KEY,certPath: SECURE_CERT}}
],
backend: ascoltatore,
persistence: {
factory: mosca.persistence.Redis
},
}
console.log("loaded.");
var broker = new mosca.Server(moscaSettings);
wss is not work
when I change the type:"https" to "mqtts", it works fine,
What's the problem with https? the same code is fine before...
jack
@jack0320
In localhost the https is also fine, in remote server it cannot connect.
When I use curl -v https://host:port, it return connect timeout, it seems the port is not open, but I'm sure the port is opened fine.
Nestor Figliuolo
@Makaan
Hi! I'm having problems creating the https object in my server, the error i'm getting is Error: one of the defiend interfaces requires credentials, but i have passed the keyPath and certPath paths
I've solved it! the keyPath and certPath needed to be in the scure object property
tudders
@tudders
Hi. Great repo! Question: I want to turn of publishing to a topic except to a select few, to avoid spamming. What's the best way to do this?
thabotharshan
@thabotharshan
Hi how to keep the messages and publish again after a time out ,if mosca didn't receive expected reply from Client? Any workaround to achieve this
Bhargav yadati
@bhargavdt3
Anyone has a solution on this
Error connecting to the service protocol: failed to connect to http://127.0.0.1:49873/jjcCWlm-oZU=/