-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix issue #22 #47
fix issue #22 #47
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a unit test?
mqemitter-redis.js
Outdated
const t = this.#pubSubPrefix+topic; | ||
cb[this.#proxiedCallback] = (packet, cbcb) => { | ||
// if (!(packet.topic.startsWith(this.#pubSubPrefix))) | ||
// debugger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please removed these commented lines
Can you please rebase? I had to reconfigure CI in #48. |
allow running aedes on shared redis pub-sub by adding a topic prefix to prevent foreign pub-sub messages from interfering with aedes´s assert()ions const { MQEmitterRedisPrefix } = require('mqemitter-redis'); const myprefix = 'mqemitter_prefix/'; mq = new MQEmitterRedisPrefix(myprefix, { port: this.mqttBrokerOptions.redisPort, host: this.mqttBrokerOptions.redisHost, db: 12 });
CI is failing with this, could you take a look? |
do you want me to squash all commits into one? |
No need, I'll do it on release. |
mqemitter-redis.js
Outdated
function MQEmitterRedisPrefix (pubSubPrefix, options) { | ||
MQEmitterRedis.call(this, options) | ||
this._pubSubPrefix = pubSubPrefix | ||
this._sym_proxiedCallback = '_private_symbol_MQEmitterRedisPrefix_proxiedCallback' // Symbol('proxiedCallback'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the Symbol instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
allow running aedes on shared redis pub-sub by adding a topic prefix to prevent foreign pub-sub messages from interfering with aedes´s assert()ions
const { MQEmitterRedisPrefix } = require('mqemitter-redis');
const myprefix = 'mqemitter_prefix/';
mq = new MQEmitterRedisPrefix(myprefix, {
port: this.mqttBrokerOptions.redisPort,
host: this.mqttBrokerOptions.redisHost,
db: 12
});