HornetQ stomp doesn't support such a feature. In fact you may not need it. What type of client are you using? java or perl or .net? Why not your client just receive one message after your finished the previous one?
Thanks for this Howard.
I'm using Net::STOMP::Client in Perl, using a STOMP 1.2 connection. I've looked through the docs for the client library, but can't see anything regarding limiting the buffer size.
I've taken a Wireshark capture of the comms between HornetQ and the Perl client :
server:HornetQ/2.5.0.SNAPSHOT (Wild Hornet, 124) HornetQ Messaging Engine
(there are more messages sent from HornetQ without response from the Perl client -- I didn't include these for the sake of brevity.)
I've tried changing the subscribe mode to 'client' rather than 'client-individual' in case that changed the behaviour, but alas no joy.
Do you know of a header or some such I could set in the connect / subscribe on the Perl side that would cause HornetQ to send a single message at a time?
I've got a work around, although you'd hardly accuse it of being elegant.
Adding 32k of padding to the messages sent to the STOMP client causes a single message to be sent at a time. This is with the parameter <param key="tcp-send-buffer-size" value="1024"/> set or with it absent (thus defaulting to 32k according to the docs) on the STOMP acceptor.
This solves the problem for me, but if there is a cleaner solution this would clearly be preferable.
No unfortunately there isn't such a header.