Comments (7)
Maybe the event is emitted not by the connection but by the consumer? I may be completely wrong, but you can try that.
from amqp-coffee.
The frame parser was throwing the error so you could watch connection.parser.on 'error' however that is somewhat broken, so I switched it to bubble the error up to the connection
This will be fixed in 0.1.30 which will be published within the next day or two. Thanks for the report!
from amqp-coffee.
Thanks!
from amqp-coffee.
Just making sure - what will happen to the connection to rabbitmq after parser error? The connection will still alive and it's fine to keep working? Or some bad things may happen and reconnection is required?
from amqp-coffee.
This is a good question, because if we receive a oversize frame the server is violating the agreed upon connection tuning parameters. However, we could continue, if the server closes the connection then so be it. I think having a connection option here is the best because there could be a corrupted frame size, which could lead to a out of memory error.
I updated the pull request and added the connection option ignoreOversizeFrames
which defaults to false.
from amqp-coffee.
@Vaidas737 I changed my thinking on this a little.
I think the connection needs to be destroyed, and ignoring a oversize frame shouldn't be an option. Here is my reasoning. A oversized from should never exist if it does then the AMQP broker has a bug, or the client has a bug and has interpreted a packet or partial packet incorrectly. To fix that the connection would need to be restarted. If we ignore a oversize frame we have no way of knowing if the data is truly that size and what to do if its not. I think throwing a error and killing the connection is the proper thing to do. So I updated the pr to reflect this, let me know if you disagree
from amqp-coffee.
Sounds good. I'll let you know if I have any issue with it. Thanks!
from amqp-coffee.
Related Issues (20)
- Design question HOT 6
- typo in the description? HOT 1
- nodejs 4.x and 5.x support. HOT 1
- release master, add tags, etc HOT 1
- Handle method.basicCancel HOT 3
- handle connection blocked / unblocked notifications
- high latency on VM machines HOT 12
- working with activeMQ? HOT 2
- support for exchange to exchange routing HOT 1
- Error: Unmatched field {"name":"queue","domain":"shortstr"} HOT 1
- Performing a Connection Healthcheck HOT 1
- NPM warning when installing
- node-uuid -> uuid, pin versions for deps HOT 4
- Message handler not fired for blank message in QOS mode HOT 3
- Problem with contentType of published messages HOT 2
- direct reply-to & bug in the fields serialization HOT 4
- Connection continuously emits 'error' after the underlying socket died (reconnect = false)
- Publish hangs forever after connection loss (reconnect = false)
- Not able to connect to RabbitMQ cluster setup on Play with docker HOT 1
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 amqp-coffee.