Giter VIP home page Giter VIP logo

Comments (7)

witq avatar witq commented on June 29, 2024

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.

barshow avatar barshow commented on June 29, 2024

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

#74

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.

Vaidas737 avatar Vaidas737 commented on June 29, 2024

Thanks!

from amqp-coffee.

Vaidas737 avatar Vaidas737 commented on June 29, 2024

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.

barshow avatar barshow commented on June 29, 2024

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.

barshow avatar barshow commented on June 29, 2024

@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.

Vaidas737 avatar Vaidas737 commented on June 29, 2024

Sounds good. I'll let you know if I have any issue with it. Thanks!

from amqp-coffee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.