Using the blocking method will handle this case, we introduced tryPublish
so that we can fire and forget or else we can write to logs if we can't
send events. Yes in these cases sometimes we have to check the retune value
and modify the processing accordingly.

Regards
Suho

On Tue, Jun 21, 2016 at 5:59 AM, Nirmal Fernando <nir...@wso2.com> wrote:

> Hi All,
>
> While doing a performance test using a data publisher client, it was
> realized that it's important to check the returned value of tryPublish API
> and if it is false (i.e. if the event wasn't sent) Clients' should slow
> down a bit (use a sleep or similar)  to avoid spinning the CPU.
>
> Please note this especially when you write a data publisher client to do a
> migration, a performance test etc.
>
> We need to add a note in
> https://docs.wso2.com/pages/viewpage.action?pageId=48288495#PublishingDataUsingJavaClientThroughThrift/Binary-Datapublishersample
> too IMO.
>
> --
>
> Thanks & regards,
> Nirmal
>
> Team Lead - WSO2 Machine Learner
> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


-- 

*S. Suhothayan*
Technical Lead & Team Lead of WSO2 Complex Event Processor
*WSO2 Inc. *http://wso2.com
* <http://wso2.com/>*
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
<http://suhothayan.blogspot.com/>twitter: http://twitter.com/suhothayan
<http://twitter.com/suhothayan> | linked-in:
http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to