-
Notifications
You must be signed in to change notification settings - Fork 35
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
deliver packet not msg from session #843
Conversation
src/lavinmq/mqtt/session.cr
Outdated
dup: env.redelivered, | ||
qos: qos, | ||
retain: retained, | ||
topic: msg.routing_key.tr(".", "/") |
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.
@spuun is this .tr
really correct?
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.
I don't think you need to convert between topic and routing key here. I think we're storing it as topic.
But if it's a routing key you want to convert .
to /
.
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.
yep thats a rest that i forgot to remove (and i removed it now form mqtt-poc)
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.
removing the tr
then.
WDYT of the change otherwise?
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.
looks good :)
ead9b8a
to
f073732
Compare
* deliver packet not msg from session * it's already a topic, no convert needed * fixes
* deliver packet not msg from session * it's already a topic, no convert needed * fixes
Session
deliversMQTT:Publish
instead ofEnvelope
to consumer