Hi Peter,

But thank you for your contribution. I'll look into this ... hopefully I'll 
find some time to do that tomorrow.

But as someone who knows the codebase, that there are probably several issues 
in the handling and cleanup of queues. Hopefully you found and fixed one of 
them.


Chris



________________________________
Von: Peter Hall <[email protected]>
Gesendet: Donnerstag, 25. Februar 2016 17:00
An: [email protected]
Betreff: Blaze DS issue

Hi,
We have found a performance issue which we tracked down to what we think is a 
bug in Blaze DS. I have made a PR for a possible fix here: 
https://github.com/apache/flex-blazeds/pull/2, however we are not very familiar 
with the codebase and we'd appreciate some feedback on if we have the right 
approach.
[https://avatars0.githubusercontent.com/u/150875?v=3&s=400]<https://github.com/apache/flex-blazeds/pull/2>

Fixed bug with flushing messages to polling client. by peterjoel · Pull Request 
#2 · apache/flex-blazeds<https://github.com/apache/flex-blazeds/pull/2>
github.com
When flushing the message queue on a poll, messageClient is null. (See 
JavaDoc). This should mean that all messages for the flexClient are flushed. 
Instead, only the messages that have the same mes...



The issue we found occurred when a single client has multiple subscriptions 
(multiple mx.messaging.Consumers on the Flex side), using the same polling 
channel, which is configured like this:

<channel id="my-secure-polling-amf"
         type="mx.messaging.channels.SecureAMFChannel">
    <endpoint uri="https://foo.bar:443/appName/messagebroker/amfpollingSecure"/>
    <properties>
        <polling-enabled>true</polling-enabled>
        <polling-interval-seconds>1</polling-interval-seconds>
    </properties>
</channel>

When a poll hits the server, it ends up calling 
FlexClientOutboundQueueProcessor.flush() on the server. It doesn't pass a 
MessageClient as an argument, which (according to the javadoc on that file) 
should mean that it will flush messages for all clients. But instead it finds 
the first message in the queue and flushes all messages that have the same 
MessageClient as that one. If a user has 10 consumers with queued messages, it 
will have to poll once per consumer, which means 10 polls and 10 seconds to 
clear the queue. The change in my PR will cause it to flush the entire queue 
each time, so you will get all your data in a single poll.

--

Peter Hall
Platform Architect

[logo]<http://www.algomi.com/>
ALGOMI LIMITED
One America Square
17 Crosswall
London EC3N 2LB

Tel: +44 207 954 4543
Mob: +44 779 109 6899
www.algomi.com<http://www.algomi.com/>

[http://www.algomi.com/img/apps/fintech2015.png]

This email and its contents, including all accompanying communications and 
attachments, is strictly confidential and only for the intended recipient(s). 
If you have received this email by mistake, please notify the sender 
immediately and do not disclose its contents. Any retention, use or disclosure 
not expressly authorised by Algomi Limited is prohibited.

Algomi Limited is registered in England and Wales under Company No. 08111389 
with its registered office at One America Square, 17 Crosswall, London EC3N 
2LB, United Kingdom.  Algomi Limited is not regulated, nor is it registered as 
a broker-dealer or investment advisor in any jurisdiction.

Please visit http://www.algomi.com/#contacts for the contact information of our 
offices worldwide.

Reply via email to