Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer out of range exception #26

Open
vitorsilvalima opened this issue Mar 29, 2017 · 2 comments
Open

Buffer out of range exception #26

vitorsilvalima opened this issue Mar 29, 2017 · 2 comments

Comments

@vitorsilvalima
Copy link

Hi, I get an exception when I run the following code:

`const container = require('rhea');

container.on('connection_open', function (context) {
context.connection.open_receiver('TEST');

});

container.on('message', function (context) {
console.log(context.message.body);
});

container.connect({'port':5672});`

The exception message conveys that the buffer is out of range. The exception error is the following:
`buffer.js:821
throw new RangeError('Index out of range');
^

RangeError: Index out of range
at checkOffset (buffer.js:821:11)
at Buffer.readUInt32BE (buffer.js:895:5)
at Transport.read (/home/vlima/Documents/development/nodejs/node-stomp-ws/node_
modules/rhea/lib/transport.js:74:33)
at Connection.input (/home/vlima/Documents/development/nodejs/node-stomp-ws/nod
e_modules/rhea/lib/connection.js:370:31)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:548:20)`

@grs
Copy link
Member

grs commented Mar 29, 2017

I need a little more information to be able to reproduce your problem. What are you connecting to? Does the TEST queue (or topic) exist? Does it have a message and if so how was that message sent?

@vitorsilvalima
Copy link
Author

I'm using the Artemis Broker, the enterprise version that is not yet released. This queue is already created on the broker and it has more than 1000 messages waiting to be consumed. The payload for each message is "test message: number"
screenshot from 2017-03-30 12-07-06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants