[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-08-13 Thread Chirag Anand (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16579287#comment-16579287
 ] 

Chirag Anand commented on CAMEL-12668:
--

[~dmvolod] This helps, i am able to capture the inflight exchanges. Can you 
please provide me with the details of the new issue which you will open? I 
would like to keep a track of it.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-08-06 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570242#comment-16570242
 ] 

Dmitry Volodin commented on CAMEL-12668:


[~chirag0103] it's not a Context option, it's a route option. Your route must 
looks like

{code:java}
from("stream:file?fileName=src/main/resources/test.txt").shutdownRoute(ShutdownRoute.Defer)...
{code}


> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-08-06 Thread Chirag Anand (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16570231#comment-16570231
 ] 

Chirag Anand commented on CAMEL-12668:
--

[~dmvolod] Can you please provide me with a code snippet on how to shutdown the 
route? i tried context.shutdownRoute("Routeid"), it still failed with the same 
exception.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-08-06 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16569853#comment-16569853
 ] 

Dmitry Volodin commented on CAMEL-12668:


[~chirag0103], you can try to use shutdownRoute(Defer) option as workaround, 
but it doesn't solve a core problem. If it helps in your case I will close this 
issue and open a new one with the root case description.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-08-03 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16568280#comment-16568280
 ] 

Dmitry Volodin commented on CAMEL-12668:


The last things: it's note related to Suspendable implementation. I've added 
delay (~10 sec) to the AggregationStrategy implementation and detects that 
suspension a little bit helps with fast aggregation completion but doesn't in 
other way. Need to be check root case.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-08-03 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16567902#comment-16567902
 ] 

Dmitry Volodin commented on CAMEL-12668:


I've done a research and detects that consumer with streaming capabilities has 
a wrong shutdown life-cycle if it doesn't implements 
org.apache.camel.Suspendable interface, i.e. RejectableThreadPoolExecutor 
shutdown before AggregateProcessor complete.

2018-08-02 10:37:46,038 [lication.main()] INFO  CamelApplication   
- Starting Context shut down
2018-08-02 10:37:46,039 [lication.main()] INFO  DefaultCamelContext    
- Apache Camel 2.17.0 (CamelContext: camel-1) is shutting down
2018-08-02 10:37:46,040 [lication.main()] INFO  DefaultShutdownStrategy    
- Starting to graceful shutdown 1 routes (timeout 300 seconds)
2018-08-02 10:37:46,041 [lication.main()] DEBUG DefaultExecutorServiceManager  
- Created new ThreadPool for source: 
org.apache.camel.impl.DefaultShutdownStrategy@4844cb37 with name: ShutdownTask. 
-> 
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@7be90f7b[Running, 
pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 
0][ShutdownTask]
2018-08-02 10:37:46,048 [ - ShutdownTask] DEBUG DefaultShutdownStrategy    
- There are 1 routes to shutdown
2018-08-02 10:37:46,049 [ - ShutdownTask] DEBUG DefaultExecutorServiceManager  
- Forcing shutdown of ExecutorService: 
org.apache.camel.util.concurrent.RejectableThreadPoolExecutor@3598612a[Running, 
pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 
1][stream://file?fileName=src%2Fmain%2Fresources%2Ftest.txt]
2018-08-02 10:37:46,051 [ - ShutdownTask] DEBUG DefaultManagementAgent 
- Unregistered MBean with ObjectName: 
org.apache.camel:context=camel-1,type=threadpools,name="StreamConsumer(0x19584fb0)"
2018-08-02 10:37:46,052 [ - ShutdownTask] DEBUG StreamConsumer 
- Stopping consumer: 
Consumer[stream://file?fileName=src%2Fmain%2Fresources%2Ftest.txt]
2018-08-02 10:37:46,053 [ - ShutdownTask] INFO  DefaultShutdownStrategy    
- Route: route1 shutdown complete, was consuming from: 
Endpoint[stream://file?fileName=src%2Fmain%2Fresources%2Ftest.txt]
2018-08-02 10:37:46,054 [ - ShutdownTask] DEBUG AggregateProcessor 
- Aggregation complete for correlation key true sending aggregated exchange: 
Exchange[]
2018-08-02 10:37:46,057 [ - ShutdownTask] DEBUG AggregateProcessor 
- Processing aggregated exchange: 
Exchange[ID-dvolodin-redhat-local-34899-1533195455487-0-3]
2018-08-02 10:37:46,063 [ - ShutdownTask] WARN  AggregateProcessor 
- Error processing aggregated exchange. 
Exchange[ID-dvolodin-redhat-local-34899-1533195455487-0-3]. Caused by: 
[java.util.concurrent.RejectedExecutionException - null]

For example, for camel-stream component add Suspendable marker implementation 
solves the problem. But the problem can be more common for other similar 
components. [~davsclaus], [~ancosen] what do you think about potential fix: 
check for components with streaming capabilities and add Suspendable marker 
implementation or continue investigate the core problem related to CAMEL-9577 
fix?

 

 

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-08-01 Thread Chirag Anand (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16564999#comment-16564999
 ] 

Chirag Anand commented on CAMEL-12668:
--

[~dmvolod] Please try with the repo 
[https://github.com/chirag0103/CamelForceCompletionOnStopTest]. This is a maven 
project and much cleaner. You can change the camel version from pom.xml, 
currently i have set it to 2.17.0

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-31 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563801#comment-16563801
 ] 

Dmitry Volodin commented on CAMEL-12668:


Please provide info how to run your sample in command line mode.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-31 Thread Chirag Anand (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563775#comment-16563775
 ] 

Chirag Anand commented on CAMEL-12668:
--

[~dmvolod] The reproducer code seems to be fine except can you use an empty 
file instead or increase the completionsize to a larger value? You can look at 
[https://github.com/chirag0103/CamelAggregationFailure] for reference. Please 
tell me if you need any other information.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-31 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563733#comment-16563733
 ] 

Dmitry Volodin commented on CAMEL-12668:


[~chirag0103], could you please to look at reproducer code. Is it suitable to 
your issue?

https://github.com/dmvolod/test-forcecompleteonstop-stream

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.1
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-25 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16555753#comment-16555753
 ] 

Dmitry Volodin commented on CAMEL-12668:


[~chirag0103] I didn't reproduce your issue in my env (except spring-boot 
configuration). Could you please confirm it and/or prepare different projects 
published on github. It's prefer way to show this with working camel version, 
i.e. 2.16.0 and problem with the latest upstream - 2.23-SNAPSHOT or 2.22.0.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Assignee: Dmitry Volodin
>Priority: Major
> Fix For: 2.22.0
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-24 Thread Andrea Cosentino (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554396#comment-16554396
 ] 

Andrea Cosentino commented on CAMEL-12668:
--

For sure the fix won't be for 2.17. It's not maintained anymore. 2.21 or 2.22. 
By the way when someone will have time this will be fixed. If you need 
something faster than this you need to switch to commercial support. 
Contributors work on Camel in their free time.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Priority: Major
> Fix For: 2.22.0
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-24 Thread Chirag Anand (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554378#comment-16554378
 ] 

Chirag Anand commented on CAMEL-12668:
--

[~dmvolod] I have tried the same scenario with camel-stream component using the 
same aggregation logic. It succeeded for version 2.16.2 but when i am using 
2.17.0 it fails again. The route i am using is as follows - 

 

from("stream:file?fileName=C:/Test/ABC.txt")
    .aggregate(constant(true), new CamelAggregator()).completionSize(50)
    .forceCompletionOnStop().process(new Processor() {
    @Override
    public void process(Exchange exchange) throws Exception {
    List statusObjects = 
exchange.getIn().getBody(List.class);
    System.out.println(statusObjects.size());
    }
    }).end();

 

Can we please fix it at the earliest now? It's very important that this gets 
fixed soon.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Priority: Major
> Fix For: 2.22.0
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-24 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554086#comment-16554086
 ] 

Dmitry Volodin commented on CAMEL-12668:


[~chirag0103] could you check with 
[came-stream|https://github.com/apache/camel/blob/master/components/camel-stream/src/main/docs/stream-component.adoc]
 component to isolate problem. It would be nice to have JUnit test project 
published on github.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Priority: Major
> Fix For: 2.22.0
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-24 Thread Chirag Anand (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16554012#comment-16554012
 ] 

Chirag Anand commented on CAMEL-12668:
--

Hi [~dmvolod], Thank you for responding. I tried the same thing using file 
component and it seemed to work fine but doesn't work when using the twitter 
component. I am testing this with Camel version 2.17.0.

 

The route that i am using for twitter component is as such -

public class CamelRoute extends RouteBuilder {

    @Override
    public void configure() throws Exception {

    
from("twitter://streaming/filter?accessToken=xxx=xxx=xxx=xxx=XYZ=event")
    .aggregate(constant(true), new 
CamelAggregator()).completionSize(50)
    .forceCompletionOnStop().process(new Processor() {
    @Override
    public void process(Exchange exchange) throws Exception {
    List statusObjects = 
exchange.getIn().getBody(List.class);
    System.out.println(statusObjects.size());
    }
    }).end();
    }

}

 

The custom aggregation logic is as such -

public class CamelAggregator implements AggregationStrategy {

    @Override
    public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
    Object newBody = newExchange.getIn().getBody(Object.class);
    List list = null;

    if (oldExchange == null) {
    list = new ArrayList<>();
    list.add(newBody);
    newExchange.getIn().setBody(list);
    return newExchange;
    } else {
    list = oldExchange.getIn().getBody(ArrayList.class);
    list.add(newBody);
    return oldExchange;
    }
    }
}

 

The route which succeeded for the file component is as such -

public class CamelFileRoute extends RouteBuilder {

    @Override
    public void configure() throws Exception {
        from("file://C:/Test")
    .aggregate(constant(true), new CamelAggregator()).completionSize(50)
    .forceCompletionOnStop().process(new Processor() {
    @Override
    public void process(Exchange exchange) throws Exception {
    List statusObjects = 
exchange.getIn().getBody(List.class);
    System.out.println(statusObjects.size());
    }
    }).end();
    }

}

 

Please tell me if i am making any mistake here or if there is any problem with 
the twitter component only?

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Priority: Major
> Fix For: 2.22.0
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12668) Aggregate with forcecompleteonstop doesn't seem to be honored

2018-07-24 Thread Dmitry Volodin (JIRA)


[ 
https://issues.apache.org/jira/browse/CAMEL-12668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16553953#comment-16553953
 ] 

Dmitry Volodin commented on CAMEL-12668:


[~chirag0103], please provide a simple unit test. Without twitter source it 
could be fine.

> Aggregate with forcecompleteonstop doesn't seem to be honored
> -
>
> Key: CAMEL-12668
> URL: https://issues.apache.org/jira/browse/CAMEL-12668
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.17.0
>Reporter: Chirag Anand
>Priority: Major
> Fix For: 2.22.0
>
>
> I have a camel project where I am using twitter component of the camel and 
> using the streaming/filter endpoint. The route is something like 
> from().aggregate().completionSize().forceCompletionOnStop().process().
>  The problem here is when I stop the context the remaining aggregated 
> exchanges are not being flushed to the processor. Earlier I was using version 
> 2.16.2 and it worked fine, but with the latest release i.e 2.22.0 I am facing 
> this issue. The configuration hasn’t changed a bit. To be certain i tried it 
> with version 2.17.0 also, doesn't work either.
>  
> I tried debugging and I noticed at somepoint there is a 
> RejectedExecutionException, not sure why because there is no change in the 
> configuration.
>  
> Can you please resolve this at the earliest? or at least tell me if there has 
> been any change in the functionality/usage?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)