Hi Bernard,

If you want to slow down the iterator frequency, you can define a thread
sleep inside sequence section with the support of script mediator.

Ex:
<script language="js"><![CDATA[java.lang.Thread.sleep(700);]]></script>

Regards,
Chandana

On Fri, 17 Aug 2018 at 16:43, Bernard Paris <bernard.pa...@uclouvain.be>
wrote:

> Hello,
>
> it is confirmed that the problem comes from the external application
> server which limits incoming requests, the ones  sent by ESB iterate
> mediator.
> These are hundreds of requests and the ESB output rate is too high to
> be caught by the application server.
> Is there a way to control / reduce that iterate mediator output rate ?
>
> Bernard
>
>
> Le 15 août 2018 à 06:11, Shakila Sasikaran <shak...@wso2.com> a écrit :
>
> Hi,
>
> You have mentioned that the client didn't get the response. Could you
> please try with an enclosing element?
>
>      <property name="response">
>         <response xmlns=""/>
>     </property>
>
>     <aggregate id="agg_sitemap">
>          <completeCondition>
>              <messageCount min="-1" max="-1"/>
>          </completeCondition>
>          <onComplete enclosingElementProperty="response"
> expression="$body/*[1]" >
>              <send />
>          </onComplete>
>    </aggregate>
>
> Thanks
>
> On Tue, Aug 14, 2018 at 8:57 PM, Bernard Paris <bernard.pa...@uclouvain.be
> > wrote:
>
>> Hi devs,
>>
>> what could explain that an aggregate mediator never complete ?
>>
>> DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} -
>>  391 messages of 533 collected in current aggregation
>> {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
>> DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} -
>>  392 messages of 533 collected in current aggregation
>> {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
>> DEBUG {org.apache.synapse.mediators.eip.aggregator.AggregateMediator} -
>>  393 messages of 533 collected in current aggregation
>> {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
>>
>> It stops after lot of  messages collected (393 in this example, but it
>> could 333, or 346, …. more or less, but never the expected 553)   and no
>> response is sent back to the cilent:
>>
>> End : Aggregate mediator
>> {org.apache.synapse.mediators.eip.aggregator.AggregateMediator}
>> End : Filter mediator
>>  {org.apache.synapse.mediators.filters.FilterMediator}
>> TID: [-1234] [] [2018-08-14 17:09:06,424] DEBUG
>> {org.apache.synapse.mediators.base.SequenceMediator} -  End : Sequence
>> <anonymous> {org.apache.synapse.mediators.base.SequenceMediator}
>> TID: [-1] [] [2018-08-14 17:09:43,949]  INFO
>> {org.apache.synapse.transport.passthru.SourceHandler} -  Writer null when
>> calling informWriterError
>> {org.apache.synapse.transport.passthru.SourceHandler}
>> TID: [-1] [] [2018-08-14 17:09:43,949]  WARN
>> {org.apache.synapse.transport.passthru.SourceHandler} -  Connection time
>> out after request is read: http-incoming-158 Socket Timeout : 180000 Remote
>> Address : /127.0.0.1:62109
>>  {org.apache.synapse.transport.passthru.SourceHandler}
>> TID: [-1] [] [2018-08-14 17:10:55,719]  INFO
>> {org.apache.synapse.transport.passthru.SourceHandler} -  Writer null when
>> calling informWriterError
>> {org.apache.synapse.transport.passthru.SourceHandler}
>> TID: [-1] [] [2018-08-14 17:10:55,719]  WARN
>> {org.apache.synapse.transport.passthru.SourceHandler} -  Connection time
>> out after request is read: http-incoming-159 Socket Timeout : 180000 Remote
>> Address : /127.0.0.1:62536
>>  {org.apache.synapse.transport.passthru.SourceHandler}
>> TID: [-1] [] [2018-08-14 17:12:00,872]  INFO
>> {org.apache.synapse.transport.passthru.SourceHandler} -  Writer null when
>> calling informWriterError
>> {org.apache.synapse.transport.passthru.SourceHandler}
>> TID: [-1] [] [2018-08-14 17:12:00,872]  WARN
>> {org.apache.synapse.transport.passthru.SourceHandler} -  Connection time
>> out after request is read: http-incoming-160 Socket Timeout : 180000 Remote
>> Address : /127.0.0.1:62952
>>  {org.apache.synapse.transport.passthru.SourceHandler}
>>
>>
>> My sequence cannot be simplest (only one iterate mediator):
>>
>>
>> <inSequence>
>> . . . . .
>>
>>   <iterate description="" expression="$body/prog:offers/prog:offer" 
>> id="agg_sitemap" xmlns:prog="
>> https://uclouvain.be/progs";>
>>         <target>
>>             <sequence>
>>
>>   <property expression="$ctx:myCookie" name="Cookie" scope="transport" 
>> type="STRING"/>
>>
>>   <property description="url" expression="$body/prog:offer/prog:url_fr" 
>> name="uri.var.url" scope="default" type="STRING"/>
>>                 <send>
>>                     <endpoint>
>>                         <http method="get" uri-template="
>> http://myserver/mypath/{uri.var.url}?sitemap=yes"/>
>>                     </endpoint>
>>                 </send>
>>             </sequence>
>>         </target>
>>     </iterate>
>> </inSequence><outSequence>
>> ...
>>                   <aggregate id="agg_sitemap">
>>                      <completeCondition>
>>                      <messageCount min="-1" max="-1"/>
>>                      </completeCondition>
>>                         <onComplete expression="$body/*[1]">
>>                             <send />
>>                         </onComplete>
>>                     </aggregate>
>>
>>
>>
>>
>>
>> On the application server being called from the iterate endpoint I can
>> watch the 393 calls then nothing special, no errors. So where are the
>> missing requests ?
>>
>> Thanks,
>>
>> Bernard
>>
>>
>>
>> <image001.png>
>>
>> *Bernard Paris*
>>
>> *Publication programme d'études - gestion ESB Informaticien SGSI/SISG*
>> *Service général du système d'information (SGSI)*
>> Place des Sciences, 4 bte L6.08.01
>> 1348 Louvain-la-Neuve
>>
>> Email: bernard.pa...@uclouvain.be
>> Tél. 32 (0)10 47 45 27
>> https://uclouvain.be/fr/decouvrir/sgsi.html
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Shakila Sasikaran
> Software Engineer
> Mobile :+94 (0) 77 526 6848
> shak...@wso2.com
> WSO2, Inc.
> lean . enterprise . middleware
> http://www.wso2.com/
>
>
>
>
> *Bernard Paris*
>
> *Publication programme d'études - gestion ESB Informaticien SGSI/SISG*
> *Service général du système d'information (SGSI)*
> Place des Sciences, 4 bte L6.08.01
> 1348 Louvain-la-Neuve
>
> Email: bernard.pa...@uclouvain.be
> Tél. 32 (0)10 47 45 27
> https://uclouvain.be/fr/decouvrir/sgsi.html
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 

Blog: http://blog.napagoda.com
Linkedin: https://www.linkedin.com/in/chandananapagoda/
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to