Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
proton-c-0.30.0
-
None
-
None
-
To compile the clients install qpid-proton-c-devel and simply compile:
gcc -O2 -g -Wall -lqpid-proton -lm -o clogger clogger.c
To reproduce my test, build qdrouterd and run it in the background.
You need to have a consumer attached. There is a test receiver client in the qdrouterd build in <build-dir>/tests/test-receiver. This receiver is designed to handle streaming messages (by default sent to 'test-address')
Run the consumer in the background then run each clogger (default params are fine).
You should observe that clogger-reactor runs smoothly (use PN_TRACE_FRM=1 on qdrouterd as well).
You'll see clogger-reactor send the message header, then nothing for awhile, then send the entire message.
Use "-D" for debug output to see how many bytes have been written to pn_link_send()
To compile the clients install qpid-proton-c-devel and simply compile: gcc -O2 -g -Wall -lqpid-proton -lm -o clogger clogger.c To reproduce my test, build qdrouterd and run it in the background. You need to have a consumer attached. There is a test receiver client in the qdrouterd build in <build-dir>/tests/test-receiver. This receiver is designed to handle streaming messages (by default sent to 'test-address') Run the consumer in the background then run each clogger (default params are fine). You should observe that clogger-reactor runs smoothly (use PN_TRACE_FRM=1 on qdrouterd as well). You'll see clogger-reactor send the message header, then nothing for awhile, then send the entire message. Use "-D" for debug output to see how many bytes have been written to pn_link_send()
Description
I have a proactor-based C test client that has the ability to slowly send extremely large messages slowly. This is done by sending 'chunks' of body data with pauses in between.
This client was designed to test large streaming messages against qdrouterd.
The behavior of this client is unexpected - I would expect the message data to appear "on the wire" in bursts relatively quickly. In reality the data is buffered - in some cases over 1 GB is buffered - before it is written (as indicated by the lack @transfer frames dumped by the client AND the qdrouterd). In some cases it takes up to 30 seconds before the client's data starts being written to the client.
I've refactored the client to use reactor instead and the data flows as expected. There is minimal buffering and no abnormally long pauses.
The clients are attached.
It is quite likely the proactor client is incorrectly implemented, but I used the qdrouterd I/O loop as the model and cannot see what may be wrong.