Comments (6)
Hi @GlennButera,
I haven't come across this before, but other RabbitMQ issues I've found online suggest this problem can occur when publishing from different threads using the same channel. If I understand correctly, a message published by one thread is being mutated by another thread before it is sent, invalidating it.
While Node.js isn't multithreaded, you can get this behaviour when sharing data between asynchronous code. You're using JSON.stringify to serializse _packet
so I believe that must be safe, however you are passing in _options
, so potentially that is being mutated. Can you try deep cloning _options
immediately so that neither it, or the headers sub-document have any chance to be mutated?
from amqplib.
You could also try not sharing the channel. This will be a little slower though.
from amqplib.
@cressie176 I have tried "deep cloning" the _options
immediately wherever it was being used by doing a JSON.parse(JSON.stringify(_options));
. The issue still occurred.
from amqplib.
Hi @GlennButera,
I've created what I hoped would be a minimal reproducible example based on your description of the problem, but it works fine. Are you able to fork this, test it in your environment, and make the necessary amends to reproduce the frame error please?
FYI, the example uses confirm channels, but I also tried with regular ones.
from amqplib.
Any update @GlennButera?
from amqplib.
@cressie176 My apologies, we were not able to reproduce with the minimal reproducible example. We have decided to move on from the issue and are going about a different solution that will remove this issue from our code by not leveraging RabbitMQ in the same way.
from amqplib.
Related Issues (20)
- Trailing dot in URL causes TLS failure HOT 2
- docs: channel api github page has broken top links HOT 2
- docs: confusing and inconsistent usage of terms "bork", "splode", "close" HOT 7
- global prefetch become 0 if per-consume prefetch set HOT 2
- ERR_SSL_EMS_NOT_ENABLED HOT 6
- How to determine if channel.ack() is successful? HOT 2
- CPU intensive controller prevents AMQP connection from receiving heartbeat, hence connections gets closed. HOT 2
- How to know if message is published ? HOT 6
- Aborting a Message Processing when RMQ Channel Closes HOT 8
- I'm encountering an "Unexpected close" error HOT 2
- Module not found: Can't resolve 'querystring' HOT 2
- Feature: Add support for AMQP 0.9.1 "update-secret" HOT 11
- Emits a acknowledge event. HOT 1
- Unable to cancel consumers HOT 4
- Error: Unexpected close at succeed HOT 13
- Typo in the example code HOT 1
- Who calls accept()? HOT 3
- Consume large message. How do I resolve the problem that an Invalid frame occurs because the content is not read complete HOT 66
- first error message thrown by stream_socket_enable_crypto() is not propagated to caller HOT 5
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 amqplib.