Comments (5)
encodeBasicPublish
suggests it was a published message, so I guess it's routing key or one of the headers that's not a string (header values can be anything, though).
from amqplib.
Yes, it's the routing key being undefined or null I think.
I actually go to a bit of trouble to generate code that detects invalid values and raise artisinal errors with the field name and a little certificate of ownership and so on -- but the code generating code has a bug! Which means this makes it past those checks, then fails on some Node.JS core library with a bland, off-the-shelf error message.
For the minute, make sure you're at least passing an empty string in as the routingKey argument to publish.
from amqplib.
OK, fixed the bug in the code generation, and hand-turned some better error messages.
Just to be clear, it is supposed to be fine to pass undefined
for either of the routingKey
and exchange
arguments to #publish
, since they both have a default of ""
in the protocol. Supplying null
for either will result in an error though. In other words, undefined
means "I don't have a value for you", and null
means "Who's Tony Hoare?".
from amqplib.
undefined vs null: make sense. thanks, yo! :)
from amqplib.
Derick, would you give this and #49 a sanity check using master branch? I need to write some tests, for this one especially, and it would be good to have your confirmation too.
from amqplib.
Related Issues (20)
- Convert module system from CommonJS to ESM HOT 2
- No support for streams timestamp offset? HOT 8
- Unable to update consumer prefetch on the fly HOT 3
- no error event on createChannel since V10.0.0 HOT 1
- Consider removing `readable-stream`? HOT 1
- Fanout delivery acknowledgement on channel 1 timed out HOT 6
- Set a custom header before nack-ing a message HOT 5
- No Error emitted when Queue disappears or is deleted HOT 2
- SDK connecting without errors after RabbitMQ service is shut down HOT 9
- Error emitted before handler is attached causes "Unhandled 'error' event" HOT 3
- consume does not respect promises? HOT 5
- 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
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.