diff --git a/io/stomp/18-stomp.html b/io/stomp/18-stomp.html index f5284220..779bcb4f 100644 --- a/io/stomp/18-stomp.html +++ b/io/stomp/18-stomp.html @@ -82,8 +82,11 @@

Connects to an Stomp capable server to send messages.

The Destination field is optional. If set it overrides the msg.topic property of the message.

-

Note: While not a requirement of the Stomp protocol, if connecting to an ActiveMQ server, the destination should - begin with "/queue/" or with "/topic/". See +

msg.headers, if set, should be an object containing field/value + pairs to be added as request headers.

+

Note: While not a requirement of the Stomp protocol, if connecting + to an ActiveMQ server, the destination should + begin with "/queue/" or with "/topic/". See the Stomp 1.0 spec for more details.

diff --git a/io/stomp/18-stomp.js b/io/stomp/18-stomp.js index 8e0f8998..b70a3b9c 100644 --- a/io/stomp/18-stomp.js +++ b/io/stomp/18-stomp.js @@ -135,7 +135,7 @@ module.exports = function(RED) { }); node.on("input", function(msg) { - node.client.publish(node.topic || msg.topic, msg.payload); + node.client.publish(node.topic || msg.topic, msg.payload, msg.headers); }); node.on("close", function(done) { diff --git a/io/stomp/package.json b/io/stomp/package.json index 23b5289f..31b16564 100644 --- a/io/stomp/package.json +++ b/io/stomp/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-stomp", - "version" : "0.0.5", + "version" : "0.0.6", "description" : "A Node-RED node to publish and subscribe to/from a Stomp server", "dependencies" : { "stomp-client" : "0.6.2"