I got an error message like this, "error: Queue onMessage consumer function returned error: Cannot assign to read only property 'writeQueueSize' of object '#' module=amqp-ts"
In my flow, I have a node of "amqp2 in". This node can connect to a rabbbitmq server and subscribe to a queue. But when messages are published, the node-red console shows this error message.
On rabbitmq server, the messages have been consumed and removed after the error occurs.
If you go to the flow tab on this site and lookup the node, you will notice that it hasn't been updated in almost 2 1/2 years.
If you click on the View on GitHub link you will see a link for Issues of which there are 4 the latest from Feburary 2018 which leads me th think this node has been abandoned.
That leaves you with the choice of
adding your own issue hoping the author will fix it
find a different node (I have no idea if there is one or - if there is - what it would be called)
Okay, I will add my issue to github.
And I will also try other solutions. I just need a service which can translate both AMQP and MQTT to each other. Maybe I can use Apache NiFi as another low-code platform to make the service. Thanks for your advice.
I found another node for AMQP which is "node-red-contrib-rhea". This node is based on the lib of rhea which supports AMQP 1.0 protocol. I tried this node and it has almost the same error. I debugged it and revised its code. Now it works.
File: node-red/node_modules/node-red-contrib-rhea/rhea/rhea.js
Action: Add a line before line 262, the code is "delete msg.delivery.link;"
Reason: msg.delivery is a resource handler and it cannot be cloned. Just remove the protected attribute of it.
How have you made it easier tfor the suthor to mpliment the change? Have you created a pull request with your fix which would make it easier for the author to add the change into the code.
Well, I just forked to create a project on my own account and made changes to it. I have committed all the changes to my account. Do I need to do more steps to commit it to the author?