max packet size

20 views
Skip to first unread message

Glennstar

unread,
Jun 17, 2009, 6:53:26 AM6/17/09
to PoCo::MQ
Hi,
I wonder if you can tell me what the maximum size of a packet that can
be sent to the PoCo::MQ is? I am investigating an intermittent bug
which may, possibly, be related to a variable amount of data in the
payload being sent to the MQ, stomp seems to think everything is fine,
however, the subscribed process gets an empty packet.
I am not 100% sure this is the case but thought I would ask, just to
rule this possibility in or out.


Glenn

David Snopek

unread,
Jun 18, 2009, 4:01:46 PM6/18/09
to poc...@googlegroups.com
Hrm.. I'm not sure. Any limitation wouldn't be a function of the
PoCo::MQ code itself, but rather a limitation in PoCo::Server::TCP or
Poe::Filter::Stomp. Testing might be the best way to determine if
there is a limit and what happens when the limit is exceeded.

2009/6/17, Glennstar <goo...@destar.co.uk>:
--
Open Source Hacker and Language Learner
http://www.hackyourlife.org/

Kevin Esteb

unread,
Jun 18, 2009, 8:56:41 PM6/18/09
to poc...@googlegroups.com
There is no limit on packet size in Poe::Filter::Stomp.

David Snopek

unread,
Jun 19, 2009, 8:31:35 AM6/19/09
to poc...@googlegroups.com
Cool, thanks for chiming in!

Also, in thinking about this a bit more, SQLite might impose a maximum
size too if you're using DBI w/ SQLite somewhere in your stack (which
would be the case with the default storage engine).

2009/6/18, Kevin Esteb <kes...@wsipc.org>:

Kevin Esteb

unread,
Jun 19, 2009, 10:49:31 AM6/19/09
to poc...@googlegroups.com
Another thing that could be limiting packet size is sending a binary packet without a "content-length" header.

Glennstar

unread,
Jul 10, 2009, 11:47:48 AM7/10/09
to PoCo::MQ
Kevin,
Thanks for this suggestion, it hadn't occurred to me to check what
Net::Stomp was doing.
It appears that Net::Stomp::Frame (as_string) sets a content-length if
a header called bytes_message is true. As a result I suspect the
content-length is not being set. Can anyone confirm that I have
interpreted this correctly, please?

Glenn

Kevin Esteb

unread,
Jul 10, 2009, 12:19:53 PM7/10/09
to PoCo::MQ
Yes, binary data needs the header "bytes_message" set to Boolean "TRUE" before a "content-length" header is generated within the frame. The "content-length" header will then have the size of the buffer. Otherwise, the frame will be parsed to the first NUL character, anything after the NUL will be discarded as line noise.

On the other hand, text based data, doesn't really need a "bytes_message" header, but it wouldn't hurt to supply one.
Reply all
Reply to author
Forward
0 new messages