Re: ActiveMQ shuts down before Camel routes when stopping service in Windows

2017-06-19 Thread nexus
Thank you for quick reaction and help!



--
View this message in context: 
http://camel.465427.n5.nabble.com/ActiveMQ-shuts-down-before-Camel-routes-when-stopping-service-in-Windows-tp5803644p5804869.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ActiveMQ shuts down before Camel routes when stopping service in Windows

2017-06-16 Thread Zoran Regvart
Hi,
I believe this to be an issue that can only be fixed at ActiveMQ, I've
raised an issue[1] and created a pull request[2] with one way this can
be addressed.

zoran

[1] https://issues.apache.org/jira/browse/AMQ-6706
[2] https://github.com/apache/activemq/pull/254

On Thu, Jun 15, 2017 at 3:15 PM, nexus  wrote:
> Hello, Zoran
>
> Thank you for the response!
>
> I'm continuing my investigation. Seems, that shutdown of ActiveMQ + Camel
> never worked perfectly :)
>  at least starting from activemq v5.8.0 with camel v2.10.3...
> or, probably, the example configuration shipped with release and managed in
> public access does not bring desired effect
>
> I have downloaded and tested following activemq releases:
> activemq v5.8.0 (camel v2.10.3)
> activemq v5.9.0 (camel v2.12.1)
> activemq v5.10.0 (camel v2.13.1)
> activemq v5.14.5 (camel v2.16.3)
> activemq v5.14.5 (camel v2.20.0-SNAPSHOT)
> /commit fef52d7eaabe205496319f9b459da5258d8678bb/
> with tiny yet sufficient configuration based on  recommendations
> 
> from Claus Ibsen:
>
> activemq.xml 
>
> In fact, the last part of config. with props. placeholder and jetty can be
> excluded, but I've used activemq web console to produce messages.
>
> Also, I've raised error level for *org.apache.camel* logger in
> *log4j.properties* to dump more details.
>
> Testing procedure:
> start activemq service and wait until camel routes are up and running
> produce message via activemq web console
> verify that camel redirected message to other queue
> stop activemq service
> The result is always the same, activemq shuts down before camel.
> You may find details in attached log files:
> activemq-5-8-0.log
> 
> activemq-5-9-0.log
> 
> activemq-5-10-0.log
> 
> activemq-5-14-5.log
> 
> activemq-5-14-5-snapshot.log
> 
> (Camel 2.20.0-SNAPSHOT)
>
> Additionally, I've tried to simulate clean shutdown sequence by stopping
> camel routes manually from jconsole after producing message and before
> stopping activemq service.
> No errors in log:  activemq-5-14-5-jconsole.log
> 
> .
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/ActiveMQ-shuts-down-before-Camel-routes-when-stopping-service-in-Windows-tp5803644p5804170.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Zoran Regvart


Re: ActiveMQ shuts down before Camel routes when stopping service in Windows

2017-06-15 Thread nexus
Hello, Zoran

Thank you for the response!

I'm continuing my investigation. Seems, that shutdown of ActiveMQ + Camel
never worked perfectly :)
 at least starting from activemq v5.8.0 with camel v2.10.3...
or, probably, the example configuration shipped with release and managed in
public access does not bring desired effect

I have downloaded and tested following activemq releases:
activemq v5.8.0 (camel v2.10.3)
activemq v5.9.0 (camel v2.12.1)
activemq v5.10.0 (camel v2.13.1)
activemq v5.14.5 (camel v2.16.3)
activemq v5.14.5 (camel v2.20.0-SNAPSHOT)
/commit fef52d7eaabe205496319f9b459da5258d8678bb/
with tiny yet sufficient configuration based on  recommendations

  
from Claus Ibsen:

activemq.xml   

In fact, the last part of config. with props. placeholder and jetty can be
excluded, but I've used activemq web console to produce messages.

Also, I've raised error level for *org.apache.camel* logger in
*log4j.properties* to dump more details.

Testing procedure:
start activemq service and wait until camel routes are up and running
produce message via activemq web console
verify that camel redirected message to other queue
stop activemq service
The result is always the same, activemq shuts down before camel.
You may find details in attached log files:
activemq-5-8-0.log
  
activemq-5-9-0.log
  
activemq-5-10-0.log
  
activemq-5-14-5.log
  
activemq-5-14-5-snapshot.log
  
(Camel 2.20.0-SNAPSHOT)

Additionally, I've tried to simulate clean shutdown sequence by stopping
camel routes manually from jconsole after producing message and before
stopping activemq service.
No errors in log:  activemq-5-14-5-jconsole.log
 
.





--
View this message in context: 
http://camel.465427.n5.nabble.com/ActiveMQ-shuts-down-before-Camel-routes-when-stopping-service-in-Windows-tp5803644p5804170.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ActiveMQ shuts down before Camel routes when stopping service in Windows

2017-06-14 Thread Zoran Regvart
Hi,
we have made a change slated to be released in 2.20.x, see
CAMEL-11261[1] that should help with this.

You can help us greatly by running with 2.20.0-SNAPSHOT and verifying
if it helps for your use case.

An option exists to merge this into patch version for 2.19. But to
prevent breaking applications in a patch release I would like some
feedback before we do that,

thank you :)

zoran

[1] https://issues.apache.org/jira/browse/CAMEL-11261

On Wed, Jun 14, 2017 at 12:17 PM, nexus  wrote:
> Hello, all!
>
> We are running ActiveMQ + Camel (configured using Spring) as a service
> (using wrapper) on Windows platform (x86/x64).
>
> We cannot achieve clean shutdown of activemq + camel service, because
> activemq is stopping before camel routes, which leads to many warnings and
> errors from routes regarding JMS connection loss, such as:
>
> and in some cases this
> Are there any solution to make Camel to shutdown before ActiveMQ, or maybe
> to make ActiveMQ to delay for some time on shutdown to allow Camel to stop
> routes correctly?
>
> I've already dug the subject for a long time with no success.
> Similar post here without solution:
> Errors because ActiveMQ is shutting down before CamelContext
> 
>
> Steps to reproduce the subject
>
> *1. Clean  installation* of  ActiveMQ
>    on Windows.
>
> *2. Testing* involves: start service, wait for camel routes to be started,
> stop service.
>
> *3. Configuration example #1* suggested here
> https://github.com/apache/camel/blob/master/examples/camel-example-management/src/main/resources/META-INF/spring/camel-context.xml
> 
> :
>
> *activemq.xml*
> *wrapper.log*
>
> Activemq is shutting down before camel, which leads to warning /Setup of JMS
> message listener invoker failed/.
> I assume, the log should first inform about /Apache Camel 2.18.0
> (CamelContext: camel) is shutting down/.
>
> Attached configuration:  activemq-example-1.xml
> 
> Attached log output:  wrapper-example-1.log
> 
>
>
> *4. Configuration example #2* based on default activemq.xml provided with
> installation.
> The only difference made to activemq.xml (import camel.xml, id=broker,
> useShutdownHook=false, add vm transport connector):
>
> *activemq.xml*
> *camel.xml*
> *wrapper.log*
>
> Same problem here.
>
> Attached configuration:  activemq-example-2.xml
> 
> camel-example-2.xml
> 
> Attached log output:  wrapper-example-2.log
> 
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/ActiveMQ-shuts-down-before-Camel-routes-when-stopping-service-in-Windows-tp5803644.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Zoran Regvart