[ 
https://issues.apache.org/jira/browse/PROTON-2189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17076338#comment-17076338
 ] 

Ken Giusti commented on PROTON-2189:
------------------------------------

Mick has designed a proactor client that can properly stream messages.  See his 
email to the mailing list:

 

[http://qpid.2158936.n2.nabble.com/Re-jira-Created-PROTON-2189-proactor-C-client-has-abnormally-long-pauses-during-message-send-td7691016.html]

 

I've updated my proactor client as described and can confirm it now streams as 
I expected.  Attached is the patch.

I'll leave it to the devs to decide if this is Not A Bug or a 
documentation/example gap.

[^0001-tweak-clogger-to-fix-streaming.patch]

 

> proactor C client has abnormally long pauses during message send
> ----------------------------------------------------------------
>
>                 Key: PROTON-2189
>                 URL: https://issues.apache.org/jira/browse/PROTON-2189
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.30.0
>         Environment: 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()
>            Reporter: Ken Giusti
>            Priority: Major
>         Attachments: 0001-tweak-clogger-to-fix-streaming.patch, 
> clogger-proactor.c, clogger-reactor.c
>
>
> 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.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to