-
Notifications
You must be signed in to change notification settings - Fork 472
Sending message with large header throws exception #366
Copy link
Copy link
Closed
Description
I need to be able to pass a large encrypted string as a header when sending messages. Below is the code used to send the message,
this.channel.sendToQueue(ep, message, { headers: messageHeaders, messageId: messageId });
And here is the exception that is thrown.
RangeError: Index out of range
at checkInt (buffer.js:1045:11)
at Buffer.writeUInt8 (buffer.js:1091:5)
at encodeTable (codec.js:83:18)
at encodeBasicProperties (defs.js:2773:11)
at module.exports.encodeProperties (defs.js:3544:12)
at Connection.C.sendMessage (connection.js:542:16)
at Channel.C.sendMessage (channel.js:85:26)
at Channel.publish (callback_model.js:171:17)
at Channel.sendToQueue (callback_model.js:175:15)
I believe the issue is here
Increasing the SCRATCH buffer size fixes the issue, but maybe this value shouldn't be hard coded?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels