You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Willem Jiang <wi...@gmail.com> on 2008/06/18 09:31:27 UTC
Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml
src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Hi Claus
I still can't get DataSetSedaTest pass on my windows box, so I will
exclude the test and wait for a better solution.
Willem
davsclaus@apache.org wrote:
> Author: davsclaus
> Date: Mon Jun 16 12:49:14 2008
> New Revision: 668276
>
> URL: http://svn.apache.org/viewvc?rev=668276&view=rev
> Log:
> CAMEL-605: Fixed the high concurrency issue with dataset. Must sleep during sending to have more even load on producer/consumer.
>
> Modified:
> activemq/camel/trunk/camel-core/pom.xml
> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>
> Modified: activemq/camel/trunk/camel-core/pom.xml
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?rev=668276&r1=668275&r2=668276&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/pom.xml (original)
> +++ activemq/camel/trunk/camel-core/pom.xml Mon Jun 16 12:49:14 2008
> @@ -124,7 +124,6 @@
> <excludes>
> <!-- TODO FIXME ASAP -->
> <exclude>**/InterceptorLogTest.*</exclude>
> - <exclude>**/DataSetSedaTest.*</exclude>
> </excludes>
> </configuration>
> </plugin>
>
> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java?rev=668276&r1=668275&r2=668276&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java (original)
> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java Mon Jun 16 12:49:14 2008
> @@ -63,13 +63,18 @@
> Exchange exchange = endpoint.createExchange(i);
> getProcessor().process(exchange);
>
> - long delay = endpoint.getProduceDelay();
> - if (delay > 0) {
> - try {
> + try {
> + long delay = endpoint.getProduceDelay();
> + if (delay > 0) {
> Thread.sleep(delay);
> - } catch (InterruptedException e) {
> - LOG.debug(e);
> + } else {
> + // if no delay set then we must sleep at lest for 1 nano to avoid concurrency
> + // issues with extremly high throughtput
> + Thread.sleep(0, 1);
> }
> + } catch (InterruptedException e) {
> + // ignore and just log to debug
> + LOG.debug(e);
> }
> if (reporter != null) {
> reporter.process(exchange);
>
>
>
>
Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml
src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Posted by Willem Jiang <wi...@gmail.com>.
Got it work on my windows box when I set the delay to be 3.
I will enable the DataSetSedaTest within my next commit.
Willem
Claus Ibsen wrote:
> Hi Willem
>
> Can you try this fix on your computer to see if now works?
>
> DataSetConsumer.java
>
> // if no delay set then we must sleep at lest for 1 millis to avoid concurrency
> // issues with extremly high throughtput
> delay = 1;
>
> change delay = 1 to a higher value such as:
> delay = 2
>
> I just wanted to see if the problem is still there.
>
> The issue itself is the seda queue that has an issue with copying exchanges, and not really the dataset component. Setting a delay for consuming makes the dataset component behave nicer and more as a real life situation where loads of messages are delivered with a little delay once in a while.
>
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com]
> Sent: 19. juni 2008 07:31
> To: camel-dev@activemq.apache.org
> Subject: Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>
> Hi Claus,
>
> I just ran the mvn clean install with you patch , and still got the
> DataSetSedaTest failed :(.
>
> Regards,
>
> Willem
> Claus Ibsen wrote:
>
>> Hi
>>
>> Just comitted a fix to see if it runs on the Bamboo.
>> Sending camel-core\pom.xml
>> Sending camel-core\src\main\java\org\apache\camel\component\dataset\DataSetConsumer.java
>> Transmitting file data ..
>> Committed revision 669385.
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>>
>> -----Original Message-----
>> From: Claus Ibsen [mailto:ci@silverbullet.dk]
>> Sent: 18. juni 2008 09:58
>> To: camel-dev@activemq.apache.org
>> Subject: RE: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>>
>> Hi
>>
>> Ah it runs fine on my older xp laptop. I will try to get a better patch in soon, that should cater for faster machines.
>>
>>
>> Med venlig hilsen
>>
>> Claus Ibsen
>> ......................................
>> Silverbullet
>> Skovsgårdsvænget 21
>> 8362 Hørning
>> Tlf. +45 2962 7576
>> Web: www.silverbullet.dk
>> -----Original Message-----
>> From: Willem Jiang [mailto:willem.jiang@gmail.com]
>> Sent: 18. juni 2008 09:31
>> To: camel-dev@activemq.apache.org
>> Subject: Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>>
>> Hi Claus
>>
>> I still can't get DataSetSedaTest pass on my windows box, so I will
>> exclude the test and wait for a better solution.
>>
>> Willem
>>
>> davsclaus@apache.org wrote:
>>
>>
>>> Author: davsclaus
>>> Date: Mon Jun 16 12:49:14 2008
>>> New Revision: 668276
>>>
>>> URL: http://svn.apache.org/viewvc?rev=668276&view=rev
>>> Log:
>>> CAMEL-605: Fixed the high concurrency issue with dataset. Must sleep during sending to have more even load on producer/consumer.
>>>
>>> Modified:
>>> activemq/camel/trunk/camel-core/pom.xml
>>> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>>>
>>> Modified: activemq/camel/trunk/camel-core/pom.xml
>>> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?rev=668276&r1=668275&r2=668276&view=diff
>>> ==============================================================================
>>> --- activemq/camel/trunk/camel-core/pom.xml (original)
>>> +++ activemq/camel/trunk/camel-core/pom.xml Mon Jun 16 12:49:14 2008
>>> @@ -124,7 +124,6 @@
>>> <excludes>
>>> <!-- TODO FIXME ASAP -->
>>> <exclude>**/InterceptorLogTest.*</exclude>
>>> - <exclude>**/DataSetSedaTest.*</exclude>
>>> </excludes>
>>> </configuration>
>>> </plugin>
>>>
>>> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>>> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java?rev=668276&r1=668275&r2=668276&view=diff
>>> ==============================================================================
>>> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java (original)
>>> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java Mon Jun 16 12:49:14 2008
>>> @@ -63,13 +63,18 @@
>>> Exchange exchange = endpoint.createExchange(i);
>>> getProcessor().process(exchange);
>>>
>>> - long delay = endpoint.getProduceDelay();
>>> - if (delay > 0) {
>>> - try {
>>> + try {
>>> + long delay = endpoint.getProduceDelay();
>>> + if (delay > 0) {
>>> Thread.sleep(delay);
>>> - } catch (InterruptedException e) {
>>> - LOG.debug(e);
>>> + } else {
>>> + // if no delay set then we must sleep at lest for 1 nano to avoid concurrency
>>> + // issues with extremly high throughtput
>>> + Thread.sleep(0, 1);
>>> }
>>> + } catch (InterruptedException e) {
>>> + // ignore and just log to debug
>>> + LOG.debug(e);
>>> }
>>> if (reporter != null) {
>>> reporter.process(exchange);
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>
RE: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi Willem
Can you try this fix on your computer to see if now works?
DataSetConsumer.java
// if no delay set then we must sleep at lest for 1 millis to avoid concurrency
// issues with extremly high throughtput
delay = 1;
change delay = 1 to a higher value such as:
delay = 2
I just wanted to see if the problem is still there.
The issue itself is the seda queue that has an issue with copying exchanges, and not really the dataset component. Setting a delay for consuming makes the dataset component behave nicer and more as a real life situation where loads of messages are delivered with a little delay once in a while.
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com]
Sent: 19. juni 2008 07:31
To: camel-dev@activemq.apache.org
Subject: Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Hi Claus,
I just ran the mvn clean install with you patch , and still got the
DataSetSedaTest failed :(.
Regards,
Willem
Claus Ibsen wrote:
> Hi
>
> Just comitted a fix to see if it runs on the Bamboo.
> Sending camel-core\pom.xml
> Sending camel-core\src\main\java\org\apache\camel\component\dataset\DataSetConsumer.java
> Transmitting file data ..
> Committed revision 669385.
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Claus Ibsen [mailto:ci@silverbullet.dk]
> Sent: 18. juni 2008 09:58
> To: camel-dev@activemq.apache.org
> Subject: RE: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>
> Hi
>
> Ah it runs fine on my older xp laptop. I will try to get a better patch in soon, that should cater for faster machines.
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com]
> Sent: 18. juni 2008 09:31
> To: camel-dev@activemq.apache.org
> Subject: Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>
> Hi Claus
>
> I still can't get DataSetSedaTest pass on my windows box, so I will
> exclude the test and wait for a better solution.
>
> Willem
>
> davsclaus@apache.org wrote:
>
>> Author: davsclaus
>> Date: Mon Jun 16 12:49:14 2008
>> New Revision: 668276
>>
>> URL: http://svn.apache.org/viewvc?rev=668276&view=rev
>> Log:
>> CAMEL-605: Fixed the high concurrency issue with dataset. Must sleep during sending to have more even load on producer/consumer.
>>
>> Modified:
>> activemq/camel/trunk/camel-core/pom.xml
>> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>>
>> Modified: activemq/camel/trunk/camel-core/pom.xml
>> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?rev=668276&r1=668275&r2=668276&view=diff
>> ==============================================================================
>> --- activemq/camel/trunk/camel-core/pom.xml (original)
>> +++ activemq/camel/trunk/camel-core/pom.xml Mon Jun 16 12:49:14 2008
>> @@ -124,7 +124,6 @@
>> <excludes>
>> <!-- TODO FIXME ASAP -->
>> <exclude>**/InterceptorLogTest.*</exclude>
>> - <exclude>**/DataSetSedaTest.*</exclude>
>> </excludes>
>> </configuration>
>> </plugin>
>>
>> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java?rev=668276&r1=668275&r2=668276&view=diff
>> ==============================================================================
>> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java (original)
>> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java Mon Jun 16 12:49:14 2008
>> @@ -63,13 +63,18 @@
>> Exchange exchange = endpoint.createExchange(i);
>> getProcessor().process(exchange);
>>
>> - long delay = endpoint.getProduceDelay();
>> - if (delay > 0) {
>> - try {
>> + try {
>> + long delay = endpoint.getProduceDelay();
>> + if (delay > 0) {
>> Thread.sleep(delay);
>> - } catch (InterruptedException e) {
>> - LOG.debug(e);
>> + } else {
>> + // if no delay set then we must sleep at lest for 1 nano to avoid concurrency
>> + // issues with extremly high throughtput
>> + Thread.sleep(0, 1);
>> }
>> + } catch (InterruptedException e) {
>> + // ignore and just log to debug
>> + LOG.debug(e);
>> }
>> if (reporter != null) {
>> reporter.process(exchange);
>>
>>
>>
>>
>>
>
>
>
Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml
src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Posted by Willem Jiang <wi...@gmail.com>.
Hi Claus,
I just ran the mvn clean install with you patch , and still got the
DataSetSedaTest failed :(.
Regards,
Willem
Claus Ibsen wrote:
> Hi
>
> Just comitted a fix to see if it runs on the Bamboo.
> Sending camel-core\pom.xml
> Sending camel-core\src\main\java\org\apache\camel\component\dataset\DataSetConsumer.java
> Transmitting file data ..
> Committed revision 669385.
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Claus Ibsen [mailto:ci@silverbullet.dk]
> Sent: 18. juni 2008 09:58
> To: camel-dev@activemq.apache.org
> Subject: RE: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>
> Hi
>
> Ah it runs fine on my older xp laptop. I will try to get a better patch in soon, that should cater for faster machines.
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> -----Original Message-----
> From: Willem Jiang [mailto:willem.jiang@gmail.com]
> Sent: 18. juni 2008 09:31
> To: camel-dev@activemq.apache.org
> Subject: Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>
> Hi Claus
>
> I still can't get DataSetSedaTest pass on my windows box, so I will
> exclude the test and wait for a better solution.
>
> Willem
>
> davsclaus@apache.org wrote:
>
>> Author: davsclaus
>> Date: Mon Jun 16 12:49:14 2008
>> New Revision: 668276
>>
>> URL: http://svn.apache.org/viewvc?rev=668276&view=rev
>> Log:
>> CAMEL-605: Fixed the high concurrency issue with dataset. Must sleep during sending to have more even load on producer/consumer.
>>
>> Modified:
>> activemq/camel/trunk/camel-core/pom.xml
>> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>>
>> Modified: activemq/camel/trunk/camel-core/pom.xml
>> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?rev=668276&r1=668275&r2=668276&view=diff
>> ==============================================================================
>> --- activemq/camel/trunk/camel-core/pom.xml (original)
>> +++ activemq/camel/trunk/camel-core/pom.xml Mon Jun 16 12:49:14 2008
>> @@ -124,7 +124,6 @@
>> <excludes>
>> <!-- TODO FIXME ASAP -->
>> <exclude>**/InterceptorLogTest.*</exclude>
>> - <exclude>**/DataSetSedaTest.*</exclude>
>> </excludes>
>> </configuration>
>> </plugin>
>>
>> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java?rev=668276&r1=668275&r2=668276&view=diff
>> ==============================================================================
>> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java (original)
>> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java Mon Jun 16 12:49:14 2008
>> @@ -63,13 +63,18 @@
>> Exchange exchange = endpoint.createExchange(i);
>> getProcessor().process(exchange);
>>
>> - long delay = endpoint.getProduceDelay();
>> - if (delay > 0) {
>> - try {
>> + try {
>> + long delay = endpoint.getProduceDelay();
>> + if (delay > 0) {
>> Thread.sleep(delay);
>> - } catch (InterruptedException e) {
>> - LOG.debug(e);
>> + } else {
>> + // if no delay set then we must sleep at lest for 1 nano to avoid concurrency
>> + // issues with extremly high throughtput
>> + Thread.sleep(0, 1);
>> }
>> + } catch (InterruptedException e) {
>> + // ignore and just log to debug
>> + LOG.debug(e);
>> }
>> if (reporter != null) {
>> reporter.process(exchange);
>>
>>
>>
>>
>>
>
>
>
RE: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi
Just comitted a fix to see if it runs on the Bamboo.
Sending camel-core\pom.xml
Sending camel-core\src\main\java\org\apache\camel\component\dataset\DataSetConsumer.java
Transmitting file data ..
Committed revision 669385.
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Claus Ibsen [mailto:ci@silverbullet.dk]
Sent: 18. juni 2008 09:58
To: camel-dev@activemq.apache.org
Subject: RE: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Hi
Ah it runs fine on my older xp laptop. I will try to get a better patch in soon, that should cater for faster machines.
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com]
Sent: 18. juni 2008 09:31
To: camel-dev@activemq.apache.org
Subject: Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Hi Claus
I still can't get DataSetSedaTest pass on my windows box, so I will
exclude the test and wait for a better solution.
Willem
davsclaus@apache.org wrote:
> Author: davsclaus
> Date: Mon Jun 16 12:49:14 2008
> New Revision: 668276
>
> URL: http://svn.apache.org/viewvc?rev=668276&view=rev
> Log:
> CAMEL-605: Fixed the high concurrency issue with dataset. Must sleep during sending to have more even load on producer/consumer.
>
> Modified:
> activemq/camel/trunk/camel-core/pom.xml
> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>
> Modified: activemq/camel/trunk/camel-core/pom.xml
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?rev=668276&r1=668275&r2=668276&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/pom.xml (original)
> +++ activemq/camel/trunk/camel-core/pom.xml Mon Jun 16 12:49:14 2008
> @@ -124,7 +124,6 @@
> <excludes>
> <!-- TODO FIXME ASAP -->
> <exclude>**/InterceptorLogTest.*</exclude>
> - <exclude>**/DataSetSedaTest.*</exclude>
> </excludes>
> </configuration>
> </plugin>
>
> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java?rev=668276&r1=668275&r2=668276&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java (original)
> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java Mon Jun 16 12:49:14 2008
> @@ -63,13 +63,18 @@
> Exchange exchange = endpoint.createExchange(i);
> getProcessor().process(exchange);
>
> - long delay = endpoint.getProduceDelay();
> - if (delay > 0) {
> - try {
> + try {
> + long delay = endpoint.getProduceDelay();
> + if (delay > 0) {
> Thread.sleep(delay);
> - } catch (InterruptedException e) {
> - LOG.debug(e);
> + } else {
> + // if no delay set then we must sleep at lest for 1 nano to avoid concurrency
> + // issues with extremly high throughtput
> + Thread.sleep(0, 1);
> }
> + } catch (InterruptedException e) {
> + // ignore and just log to debug
> + LOG.debug(e);
> }
> if (reporter != null) {
> reporter.process(exchange);
>
>
>
>
RE: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi
Ah it runs fine on my older xp laptop. I will try to get a better patch in soon, that should cater for faster machines.
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com]
Sent: 18. juni 2008 09:31
To: camel-dev@activemq.apache.org
Subject: Re: svn commit: r668276 - in /activemq/camel/trunk/camel-core: pom.xml src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Hi Claus
I still can't get DataSetSedaTest pass on my windows box, so I will
exclude the test and wait for a better solution.
Willem
davsclaus@apache.org wrote:
> Author: davsclaus
> Date: Mon Jun 16 12:49:14 2008
> New Revision: 668276
>
> URL: http://svn.apache.org/viewvc?rev=668276&view=rev
> Log:
> CAMEL-605: Fixed the high concurrency issue with dataset. Must sleep during sending to have more even load on producer/consumer.
>
> Modified:
> activemq/camel/trunk/camel-core/pom.xml
> activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
>
> Modified: activemq/camel/trunk/camel-core/pom.xml
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?rev=668276&r1=668275&r2=668276&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/pom.xml (original)
> +++ activemq/camel/trunk/camel-core/pom.xml Mon Jun 16 12:49:14 2008
> @@ -124,7 +124,6 @@
> <excludes>
> <!-- TODO FIXME ASAP -->
> <exclude>**/InterceptorLogTest.*</exclude>
> - <exclude>**/DataSetSedaTest.*</exclude>
> </excludes>
> </configuration>
> </plugin>
>
> Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
> URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java?rev=668276&r1=668275&r2=668276&view=diff
> ==============================================================================
> --- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java (original)
> +++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java Mon Jun 16 12:49:14 2008
> @@ -63,13 +63,18 @@
> Exchange exchange = endpoint.createExchange(i);
> getProcessor().process(exchange);
>
> - long delay = endpoint.getProduceDelay();
> - if (delay > 0) {
> - try {
> + try {
> + long delay = endpoint.getProduceDelay();
> + if (delay > 0) {
> Thread.sleep(delay);
> - } catch (InterruptedException e) {
> - LOG.debug(e);
> + } else {
> + // if no delay set then we must sleep at lest for 1 nano to avoid concurrency
> + // issues with extremly high throughtput
> + Thread.sleep(0, 1);
> }
> + } catch (InterruptedException e) {
> + // ignore and just log to debug
> + LOG.debug(e);
> }
> if (reporter != null) {
> reporter.process(exchange);
>
>
>
>