Comments (14)
The tricky part is that is an ActiveMQ specific header, which might mean nothing to another stomp implementation.
Need to consider how to expose this in a stomp meaningful way.
from node-red-nodes.
Well its a generic stomp option so we could just allow use of say msg.header to pass it in for the more advanced user.... Unless there really are a defined list of possible options.
from node-red-nodes.
That would suffice, and was the first thing I tried. There could be other header items needing to be passed through, such as Stomp extensions for JMS message semantics.Then it's a matter of having access to header option documentation.
from node-red-nodes.
I have pushed a fix so you can pass in msg.headers as an object containing what you want to the output node.
What we do still need to think about is how to also expose it in the UI - especially as that would be the only way to pass in headers to the subscribe side.
from node-red-nodes.
Ok - when/where would I see the fix? I'm curious, as I've just tried a one-line fix that includes msg.headers in the call to node.client.publish (18-stomp.js, line 138).
As for the subscribe side, I don't have an immediate need for any, but the ActiveMQ extensions to Stomp suggest the need. Still, it does seem an ActiveMQ-specific extension, so a UI-specific approach could be confusing. How about just extending stomp-out to look for and process msg.headers on input and documenting that these can be inserted upstream if needed?
from node-red-nodes.
npm update node-red-node-stomp
but yes is the same change (plus some words in the html etc)
no problem with the out node - that's exactly what it does - it's the in (subscribe) node that would be tricky as it has to be done through the UI (and we would then want the out to match - as well as being able to accept msg.headers)
from node-red-nodes.
Yes. npm... :) that, I knew. I was just looking at the file via the git browser and didn't see a change.
And, yes. There is no upstream node for the in (subscribe) node. D'Oh. So, yes, a challenge. It sounds similar to a config node, supplying header contents to both the in and out nodes. In this case, it would supply either a string describing the array of headers (JSON), or perhaps a multi-select, where each selectable option would be a header/value pair?
from node-red-nodes.
Well yes a simple text box to allow a string we parse into JSON would do it... but is ugly and not very helpful. The multi select would be better if we knew all the possible options... which I don't think we do. Need to think some more..
(Fix also pushed to git now)
from node-red-nodes.
Right - I was thinking about something different to the a priori known options. Think about how you would configure host:port as a TCP config - you provide both host and port. Then, you select a single host:port config for the TCP node. What if you could create a number of header:value options and then pick N of them to configure the stomp node (as opposed to one for TCP). It seems like a consistent UI approach, but a rather big ask to support the multi-select interface and config.
from node-red-nodes.
Ok - understanding this better now. And now I'm thinking that having the headers ride in to the out node from the prior node is adequate but ugly. It means that every stomp out will have to be paired with a pass-through node that punches in msg.headers. Or it means I'll have to "wrap" the out node, to get the headers specified. So I'm all for a solution suitable for both in and out, and for it to, at minimum, contain a headers text box or, better, to have a headers config node with same or, even better, to have a headers config node that collects individual header:value pairs or, best, that has same but has "activate" checkboxes on each (seems overkill for this node, for now).
from node-red-nodes.
Well it's only necessary if you need to set the headers... it's a consistent solution with the http node - so not too arduous - cut/paste works quite well... If you want to make it tidier you can always create a subflow node containing the pair you need.
from node-red-nodes.
Yup - good idea. That will suit me fine. Thanks!
from node-red-nodes.
Able to send the Json message as Text message using below command- Stomp (Python)
conn.send(body=json.dumps(json_content), destination=destination, headers={'amq-msg-type':'text'})
from node-red-nodes.
@shyam2017 This issue was closed over 8 years ago and is specifically to do with sending messages via the Node-RED platform which runs on NodeJS. It really is not clear what link your comment has to any of this.
Please use the Node-RED forum or Slack to ask questions, if you believe you have an actual issue, open a new one, give full details and you can reference this one if needed.
from node-red-nodes.
Related Issues (20)
- select sqlite fail response
- Installation failed in latest node version above 18 HOT 1
- How can I disable the creation process? HOT 2
- Get datetime when qwery a date column HOT 2
- node-red-node-pi-gpio -> nrgpio.py uses ~1% CPU per IO port
- Node-red-node-email stops fetching GMail
- Gmail will soon require OAUTH credentials - "node-red-node-email" in jeopardy! HOT 4
- Node-red-node-email vulnerabilities HOT 6
- node-red-node-email unhelpful connect error HOT 4
- node-red-node-pushover support for attachment_base64 and attachment_type HOT 1
- mcp3xxx node does not seem to recognise raspberry pi on a pi4 running bookworm HOT 3
- Stomp node: error sending payload as XML
- node-red-node-serialport message duplication
- Issue with node-red-node-serialport and serial control Node: “TypeError: newline.substr is not a function” when Using Fixed Length Split Configuration HOT 3
- xmpp messages without type attribute can't be handled
- PiLCD: Startup warning "Raspberry Pi specific node set inactive" HOT 4
- node-red-node-ping always sends "false" in IPv4 Protocol setting HOT 9
- Email using long password and Authentication as TLS HOT 1
- node-red-node-pisrf needs updating to cope with replacement for RPi.GPIO
- Error installing node-red-node-email (node version problem?) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-nodes.