mbroadst / qamqp

AMQP 0.9.1 implementation for Qt
Other
151 stars 128 forks source link

Fix issues with channelNumber's type and nextChannelNumber #11

Closed mem closed 9 years ago

mem commented 9 years ago

Hi,

while trying to use qamqp to implement an application that has to write to a large number of queues (~ 20k) we ran into issues with the server disconnecting us while declaring the queues. Upon inspection we noticed that channelNumber is signed, limiting the range to 32k and nextChannelNumber being incrementing twice per channel, reducing the maximum number of channels to 16k.

These commits fix both of those issues.

mbroadst commented 9 years ago

Ah! I literally just ran into this today with my app, thanks for the patch :smile:

mbroadst commented 9 years ago

@mem Looks like it's failing to pass the tests, I would imagine it's got something to do with the incrementing? You can run tests with the "QAMQP_DEBUG=1" environment variable to get some "useful" debug info

mem commented 9 years ago

Looking.

mbroadst commented 9 years ago

@mem those last line notes solve the problem, if you update the PR we can merge

mbroadst commented 9 years ago

thanks for the contribution!