You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ee7arh <an...@2e-systems.com> on 2009/12/18 11:18:45 UTC

Help! org.apache.camel.impl.GroupedExchange does not exist in the latest download

Hi,

I cannot find the class org.apache.camel.impl.GroupedExchange in the 2.1
download from the main camel download site. It is also missing from the
javadocs:

http://camel.apache.org/maven/camel-core/apidocs/index.html

Please can you check what happened to it? Really cool feature to have!

Thanks
Andrew
-- 
View this message in context: http://old.nabble.com/Help%21-org.apache.camel.impl.GroupedExchange-does-not-exist-in-the-latest-download-tp26841584p26841584.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help! org.apache.camel.impl.GroupedExchange does not exist in the latest download

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I have committed the fix to trunk. Feel free to test it on your end.


On Fri, Dec 18, 2009 at 1:00 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Yeah there is a bug, I will fix it in a short while.
> I will create a ticket and commit the fix, then you can test with
> latest code from trunk if that works for you.
>
>
> On Fri, Dec 18, 2009 at 12:36 PM, ee7arh <an...@2e-systems.com> wrote:
>>
>> Hi,
>>
>> Actually still have a problem here.
>>
>> We have an aggregator with batchSize(2) and want to aggregate them together
>> into a GroupedExchange. This seems to go through but the List that we get
>> out of the GROUPED_EXCHANGE property always has 1 object instead of 2.
>> Please could you check what we are doing wrong?
>>
>> Here is the route:
>>
>> from("activemq:queue:schedChgNotificationsToSend?maxConcurrentConsumers=2&concurrentConsumers=1")
>>
>>             // Aggregate
>>
>>  .aggregate(header("dbSchedIdHeader")).batchSize(2).batchTimeout(10000L).groupExchanges()
>>
>>             // Update notification status to NT
>>             .to("bean:" + SchedChgHandler.serviceName +
>> "?method=updateNotificationStatus");
>>
>>
>> And here is the beginning of the bean at the end "updateNotificationStatus"
>>
>>  public void updateNotificationStatus(Exchange exchange) {
>>
>>         logger.info("-> updateNotificationStatus()");
>>
>>         List<Exchange> grouped
>>             = exchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class);
>>         logger.debug("Exchange list size=" + grouped.size());
>>
>> }
>>
>> So above debug statement always prints "Exchange list size=1". The
>> aggregator returns almost immediately so we know that the batchTimeout is
>> not kicking in.
>>
>> Any idea what we are doing wrong? It is almost as if the
>> DefaultAggregationStrategy is being used. I thought that the
>> groupExchanges() effectively overrides the DefaultAggregrationStrategy?
>>
>> Thanks again
>> Andrew
>>
>> --
>> View this message in context: http://old.nabble.com/Help%21-org.apache.camel.impl.GroupedExchange-does-not-exist-in-the-latest-download-tp26841584p26842229.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Help! org.apache.camel.impl.GroupedExchange does not exist in the latest download

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah there is a bug, I will fix it in a short while.
I will create a ticket and commit the fix, then you can test with
latest code from trunk if that works for you.


On Fri, Dec 18, 2009 at 12:36 PM, ee7arh <an...@2e-systems.com> wrote:
>
> Hi,
>
> Actually still have a problem here.
>
> We have an aggregator with batchSize(2) and want to aggregate them together
> into a GroupedExchange. This seems to go through but the List that we get
> out of the GROUPED_EXCHANGE property always has 1 object instead of 2.
> Please could you check what we are doing wrong?
>
> Here is the route:
>
> from("activemq:queue:schedChgNotificationsToSend?maxConcurrentConsumers=2&concurrentConsumers=1")
>
>             // Aggregate
>
>  .aggregate(header("dbSchedIdHeader")).batchSize(2).batchTimeout(10000L).groupExchanges()
>
>             // Update notification status to NT
>             .to("bean:" + SchedChgHandler.serviceName +
> "?method=updateNotificationStatus");
>
>
> And here is the beginning of the bean at the end "updateNotificationStatus"
>
>  public void updateNotificationStatus(Exchange exchange) {
>
>         logger.info("-> updateNotificationStatus()");
>
>         List<Exchange> grouped
>             = exchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class);
>         logger.debug("Exchange list size=" + grouped.size());
>
> }
>
> So above debug statement always prints "Exchange list size=1". The
> aggregator returns almost immediately so we know that the batchTimeout is
> not kicking in.
>
> Any idea what we are doing wrong? It is almost as if the
> DefaultAggregationStrategy is being used. I thought that the
> groupExchanges() effectively overrides the DefaultAggregrationStrategy?
>
> Thanks again
> Andrew
>
> --
> View this message in context: http://old.nabble.com/Help%21-org.apache.camel.impl.GroupedExchange-does-not-exist-in-the-latest-download-tp26841584p26842229.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Help! org.apache.camel.impl.GroupedExchange does not exist in the latest download

Posted by ee7arh <an...@2e-systems.com>.
Hi,

Actually still have a problem here.

We have an aggregator with batchSize(2) and want to aggregate them together
into a GroupedExchange. This seems to go through but the List that we get
out of the GROUPED_EXCHANGE property always has 1 object instead of 2.
Please could you check what we are doing wrong?

Here is the route:

from("activemq:queue:schedChgNotificationsToSend?maxConcurrentConsumers=2&concurrentConsumers=1")
           
            // Aggregate
          
 .aggregate(header("dbSchedIdHeader")).batchSize(2).batchTimeout(10000L).groupExchanges()

            // Update notification status to NT
            .to("bean:" + SchedChgHandler.serviceName +
"?method=updateNotificationStatus");


And here is the beginning of the bean at the end "updateNotificationStatus"

 public void updateNotificationStatus(Exchange exchange) {

        logger.info("-> updateNotificationStatus()");

        List<Exchange> grouped
            = exchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class);
        logger.debug("Exchange list size=" + grouped.size());

}

So above debug statement always prints "Exchange list size=1". The
aggregator returns almost immediately so we know that the batchTimeout is
not kicking in.

Any idea what we are doing wrong? It is almost as if the
DefaultAggregationStrategy is being used. I thought that the
groupExchanges() effectively overrides the DefaultAggregrationStrategy?

Thanks again
Andrew

-- 
View this message in context: http://old.nabble.com/Help%21-org.apache.camel.impl.GroupedExchange-does-not-exist-in-the-latest-download-tp26841584p26842229.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help! org.apache.camel.impl.GroupedExchange does not exist in the latest download

Posted by ee7arh <an...@2e-systems.com>.
Great, thanks, that did it!


Claus Ibsen-2 wrote:
> 
> On Fri, Dec 18, 2009 at 11:18 AM, ee7arh <an...@2e-systems.com>
> wrote:
>>
>> Hi,
>>
>> I cannot find the class org.apache.camel.impl.GroupedExchange in the 2.1
>> download from the main camel download site. It is also missing from the
>> javadocs:
>>
>> http://camel.apache.org/maven/camel-core/apidocs/index.html
>>
>> Please can you check what happened to it? Really cool feature to have!
>>
> 
> Ah we have streamlined 2.0/2.1 to only contain a single kind of
> Exchange as it helps optimize the routing flow.
> 
> 
> What you must do is to get the list of grouped exchange as a property
> 
> List<Exchange> grouped =
> exchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class);
> 
> 
> 
>> Thanks
>> Andrew
>> --
>> View this message in context:
>> http://old.nabble.com/Help%21-org.apache.camel.impl.GroupedExchange-does-not-exist-in-the-latest-download-tp26841584p26841584.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/Help%21-org.apache.camel.impl.GroupedExchange-does-not-exist-in-the-latest-download-tp26841584p26841981.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help! org.apache.camel.impl.GroupedExchange does not exist in the latest download

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Dec 18, 2009 at 11:18 AM, ee7arh <an...@2e-systems.com> wrote:
>
> Hi,
>
> I cannot find the class org.apache.camel.impl.GroupedExchange in the 2.1
> download from the main camel download site. It is also missing from the
> javadocs:
>
> http://camel.apache.org/maven/camel-core/apidocs/index.html
>
> Please can you check what happened to it? Really cool feature to have!
>

Ah we have streamlined 2.0/2.1 to only contain a single kind of
Exchange as it helps optimize the routing flow.


What you must do is to get the list of grouped exchange as a property

List<Exchange> grouped =
exchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class);



> Thanks
> Andrew
> --
> View this message in context: http://old.nabble.com/Help%21-org.apache.camel.impl.GroupedExchange-does-not-exist-in-the-latest-download-tp26841584p26841584.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus