spring-main & addRoutesBuilder : don't work together ?

2023-04-27 Thread Joël Guelluy

Hello,

I'm in migration of a program Came 2.25 to 3.18.6, and there is 
something i can't fix.
It seems like camel-spring-main & addRoutesBuilder can't work 
together... (i'm probably missing something...)


springcontext.xml
xmlns="http://camel.apache.org/schema/spring";>



MyMain.java (part)
public static void main(String[] args) throws Exception {
  Main main = new org.apache.camel.spring.Main();
 main.setApplicationContextUri("springcontext.xml");
 main.configure().addRoutesBuilder(new Route1());
 main.configure().addRoutesBuilder(new Route2());
 if (condition3)
 main.configure().addRoutesBuilder(new Route3());
 if (condition4)
main.configure().addRoutesBuilder(new Route4());
 main.run();


Behavior with 2.25 : the log says "Total 0 routes, of which 0 are 
started" and just after, i see the routes in my classes Route1..Route4 
start (seen by "Route: Route1 started and consuming from:..." ) and only 
the wanted routes depending on the conditions.


Behavior with 3.18.6 : when i start my app, i see "Routes startup 
(started:0)", and nothing after that.
I also tested to add  in the camelContext, With that, all 
the routes starts OK, but no conditions possible...


How can i have a situation like old 2.25 ?

Thanks


[ANNOUNCE] Apache Camel 3.20.4 (LTS) Released

2023-04-27 Thread Gregor Zurowski
The Camel PMC is pleased to announce the release of Apache Camel 3.20.4 (LTS).

Apache Camel is an open source integration framework that empowers you
to quickly and easily integrate various systems consuming or producing
data.

This release is a new patch release with 29 fixes and improvements.

It is available for immediate download at:

https://camel.apache.org/download/

For more details please take a look at the release notes at:

https://camel.apache.org/releases/release-3.20.4/


Re: spring-main & addRoutesBuilder : don't work together ?

2023-04-27 Thread Claus Ibsen
Try with latest 3.20.4 release first.

Also using spring-main standalone is not so common.
We mainly use/support/focus on spring boot or quarkus based runtimes.


On Thu, Apr 27, 2023 at 11:03 AM Joël Guelluy 
wrote:

> Hello,
>
> I'm in migration of a program Came 2.25 to 3.18.6, and there is
> something i can't fix.
> It seems like camel-spring-main & addRoutesBuilder can't work
> together... (i'm probably missing something...)
>
> springcontext.xml
>  xmlns="http://camel.apache.org/schema/spring";>
> 
>
> MyMain.java (part)
> public static void main(String[] args) throws Exception {
>Main main = new org.apache.camel.spring.Main();
>   main.setApplicationContextUri("springcontext.xml");
>   main.configure().addRoutesBuilder(new Route1());
>   main.configure().addRoutesBuilder(new Route2());
>   if (condition3)
>   main.configure().addRoutesBuilder(new Route3());
>   if (condition4)
>  main.configure().addRoutesBuilder(new Route4());
>   main.run();
>
>
> Behavior with 2.25 : the log says "Total 0 routes, of which 0 are
> started" and just after, i see the routes in my classes Route1..Route4
> start (seen by "Route: Route1 started and consuming from:..." ) and only
> the wanted routes depending on the conditions.
>
> Behavior with 3.18.6 : when i start my app, i see "Routes startup
> (started:0)", and nothing after that.
> I also tested to add  in the camelContext, With that, all
> the routes starts OK, but no conditions possible...
>
> How can i have a situation like old 2.25 ?
>
> Thanks
>


-- 
Claus Ibsen
-
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Camel / file component move file to "moveFailed" folder without log

2023-04-27 Thread Ephemeris Lappis
Hello.

In camel routes that work for a long time, we sometimes have some file
that is moved to the folder that is set on the "moveFailed" folder
parameter, but without any log. As the component seems to move the
file before the exchange is given to the route, our code can't log
anything...

We suspect some issue on the shared file system (a glusterfs share),
but with no error log, we can't do anything.

How can we have more information on the internal behavior of the file
component ?

Thanks for your help.

Regards.


Karaf, Camel, and Spring

2023-04-27 Thread Ephemeris Lappis
Hello.

We're upgrading Camel to 3.20.4. This version of Camel seems to depend
on Spring 5.3.27.

As the application should run on Karaf 4.4.3 that provides spring
components with version 5.3.23.

Should we either force our project dependencies to use Spring 5.3.23,
or try to upgrade the Karaf repository to use Spring 5.3.27 ?

Thanks for your help.

Regards.


Re: Karaf, Camel, and Spring

2023-04-27 Thread Claus Ibsen
Hi

That is not a problem. Camel is just a library so end user can use
different patch versions of JARs.
You can have Karaf team upgrade spring for their next releases.



On Thu, Apr 27, 2023 at 7:37 PM Ephemeris Lappis 
wrote:

> Hello.
>
> We're upgrading Camel to 3.20.4. This version of Camel seems to depend
> on Spring 5.3.27.
>
> As the application should run on Karaf 4.4.3 that provides spring
> components with version 5.3.23.
>
> Should we either force our project dependencies to use Spring 5.3.23,
> or try to upgrade the Karaf repository to use Spring 5.3.27 ?
>
> Thanks for your help.
>
> Regards.
>


-- 
Claus Ibsen
-
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Karaf, Camel, and Spring

2023-04-27 Thread Ephemeris Lappis

Hello.

As you say, it's probably not a big problem. But it seems better 
executing unit tests with the same or nearest dependency stack, 
specially blueprint Camel tests that aim to validate our routes and 
their context as well.


Indeed, having a new Spring version with a next Karaf release should the 
simplest solution.


Thanks.

Regards.


Ephemeris Lappis

Le 28/04/2023 à 06:20, Claus Ibsen a écrit :

Hi

That is not a problem. Camel is just a library so end user can use
different patch versions of JARs.
You can have Karaf team upgrade spring for their next releases.



On Thu, Apr 27, 2023 at 7:37 PM Ephemeris Lappis 
wrote:


Hello.

We're upgrading Camel to 3.20.4. This version of Camel seems to depend
on Spring 5.3.27.

As the application should run on Karaf 4.4.3 that provides spring
components with version 5.3.23.

Should we either force our project dependencies to use Spring 5.3.23,
or try to upgrade the Karaf repository to use Spring 5.3.27 ?

Thanks for your help.

Regards.





--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com