app.listen()

Message

message.stop()

It stops the message from being delivered and processed by another middleware. It other words,
this is a full stop. Message piping ends here.

app.use('hello/:name', (message, next) => {
// This will stop the hello/world message. Even if we call
// next, further middlewares will not be called.
if (message.route.params.name === 'world') message.stop();
next();
});

message.cancelDelivery()

It cancels the delivery of the message but, unlike message.stop() the message will continue
passing through the next middlewares.

function checkIsHelloWorld (message, next) {
// Message will not reach the other side if its topic is hello/world.
// If the message comes from the client it will never reach the broker and viceversa.
// However the message will still be routed onto next middlewares, if any.
if (message.route.params.name === 'world') return message.cancelDelivery();
}
app.use('hello/:name', checkIsHelloWorld, (message, next) => {
console.log('You will see this even if it is hello/world. Read comments above.');
next();
});

message.reply([[topic,] payload])

Replies back to the message sender. If the message was sent by client, it will reply to
client. If message was sent by broker, it will reply to broker. It's easy, huh?