mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Stomp - allow msg.headers to set headers on output node
This commit is contained in:
parent
dd79a64de9
commit
68e639c98a
@ -82,8 +82,11 @@
|
||||
<p>Connects to an Stomp capable server to send messages.</p>
|
||||
<p>The <b>Destination</b> field is optional. If set it overrides the <b>msg.topic</b>
|
||||
property of the message.</p>
|
||||
<p><b>Note</b>: While not a requirement of the Stomp protocol, if connecting to an ActiveMQ server, the destination should
|
||||
begin with <i>"/queue/"</i> or with <i>"/topic/"</i>. See
|
||||
<p><b>msg.headers</b></code>, if set, should be an object containing field/value
|
||||
pairs to be added as request headers.</p>
|
||||
<p><b>Note</b>: While not a requirement of the Stomp protocol, if connecting
|
||||
to an ActiveMQ server, the destination should
|
||||
begin with <i>"/queue/"</i> or with <i>"/topic/"</i>. See the
|
||||
<a href="https://stomp.github.io/stomp-specification-1.0.html#frame-SEND" target="new">Stomp 1.0 spec</a>
|
||||
for more details.</p>
|
||||
</script>
|
||||
|
@ -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) {
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user