Comments (11)
I don't want to keep my fork up, I don't think it's a good idea to have several projects doing the same thing.
I agree. I've just invited you to become collaborators
from node-red-contrib-amqp.
I also experienced the same issue, which is an error when restarting the application.
I finally found a solution to that problem, so I replaced that module with this one.
https://flows.nodered.org/node/@corentin-pasquier/node-red-contrib-amqp
from node-red-contrib-amqp.
In my opinion, you should use node-red's catch node to catch the error events from the amqp node and then decide that whether to reconnect or not. But currently the error thrown by Amqp node can't be caught by node-red, I will fix it.
from node-red-contrib-amqp.
Hello, I don't know how I can start a connection after catching an error.
However I think I found a bug with the manual ack node (I could reproduce it with the example provided).
The problem is thrown when I send several messages through this node.
When this happens, the connection is closed forever.
Here is a picture of the error, sorry I can't paste it properly:
Edit:
The error i mentioned happens when RabbitMQ close the connection, for example when you try to ack the same message twice (I know this shouldn't happen, but this is an easy way to reproduce the problem).
After this, RabbitMQ close the connection but in Node-RED the node thinks it's still connected and do nothing.
from node-red-contrib-amqp.
Hello @Stormpass, I saw you made some changes last week.
I forked your project to try a few changes as well:
main...corentin-pasquier:node-red-contrib-amqp:main
The node now tries to reconnect to the server when the connection closes.
I also added a maxAttempts parameter in order to control how many times the node tries to connect when the server is down.
Maybe you can take a look ? I can also create a PR if you want.
I don't want to keep my fork up, I don't think it's a good idea to have several projects doing the same thing.
from node-red-contrib-amqp.
Sorry for being busy in recent times.
Didn't have enough time to finish that thing we discussed above, thanks for your work and I'm glad you submitted a PR.
But I don't see how maxAttempts is controlled, are you in the process of patching that up.
To clarify, the library is not original to me. I forked it from @meowwolf/node-red-contrib-amqp because I was in a hurry to fix a couple issues.
from node-red-contrib-amqp.
MaxAttempts can be set in the node configuration.
Maybe I could have put this configuration in the broker definition but since every node has its own connection, I think it's better to keep it as a node coniguration.
I'll create several PR, one for the maxAttempts and one for the reconnect part.
Feel free to review and comment my changes. :)
from node-red-contrib-amqp.
Hello @Stormpass
I pushed two new feature branches.
I hope my code id ok. 🤞
from node-red-contrib-amqp.
Hello @Stormpass I pushed two new feature branches. I hope my code id ok. 🤞
Greet ! feature merged
from node-red-contrib-amqp.
Suddenly,I realized that “MaxAttempts “ maybe not a good idea
it is share by close and error event, and the old version will reconnect forever when close event fired. it can cause confuse.
separate close and error will make code a big change.
so i think we could replace “MaxAttempts “ to "reconnectOnError", let user decide to use it or not; if user want to limit MaxAttempts , just catch the error event and reconnect by manualy should be enough.
from node-red-contrib-amqp.
Fine for me, but I'm still wondering how you can catch the error and manualy reconnect ?
Thanks for the merge
from node-red-contrib-amqp.
Related Issues (6)
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-contrib-amqp.