Hi, That’s bad: the design should be one camel context == one file.
Regards JB > Le 11 juil. 2020 à 06:41, Sneharghya Pathak <sppatha...@gmail.com> a écrit : > > Hi JB, > > In your example, all the routes are in the same file. In my scenario, the > routes are in separate files, but the camelContext id for each file is the > same. Is that design correct? > > Regards, > Sneharghya > > On Thu, 9 Jul 2020, 1:26 pm Jean-Baptiste Onofre, <j...@nanthrax.net> wrote: > >> Hi, >> >> It works fine in Karaf Camel example ( >> https://github.com/apache/karaf/tree/master/examples/karaf-camel-example < >> https://github.com/apache/karaf/tree/master/examples/karaf-camel-example >>> ). >> >> Here’s what I did: >> >> karaf@root()> feature:repo-add >> mvn:org.apache.karaf.examples/karaf-camel-example-features/4.2.8/xml >> Adding feature url >> mvn:org.apache.karaf.examples/karaf-camel-example-features/4.2.8/xml >> karaf@root()> feature:install karaf-camel-example-blueprint >> karaf@root()> camel:route-list >> Context Route Status Total # >> Failed # Inflight # Uptime >> ------- ----- ------ ------- >> -------- ---------- ------ >> camel-1 example-email Started 0 >> 0 0 4.739 seconds >> camel-1 example-http Started 0 >> 0 0 4.739 seconds >> camel-1 example-http-inbound Started 0 >> 0 0 4.735 seconds >> >> You can see the CamelContext camel-1, but route ID are all different. >> >> Same with Java DSL instead of Blueprint DSL: >> >> karaf@root()> feature:repo-add >> mvn:org.apache.karaf.examples/karaf-camel-example-features/4.2.8/xml >> Adding feature url >> mvn:org.apache.karaf.examples/karaf-camel-example-features/4.2.8/xml >> karaf@root()> feature:install karaf-camel-example-java >> karaf@root()> camel:route-list >> Context Route Status Total # >> Failed # Inflight # Uptime >> ------- ----- ------ ------- >> -------- ---------- ------ >> camel-1 example-email Started 0 >> 0 0 3.435 seconds >> camel-1 example-http Started 0 >> 0 0 3.435 seconds >> camel-1 example-http-inbound Started 0 >> 0 0 3.432 seconds >> >> So, definitely something is wrong about what you are doing: either you >> have the same context ID (which is normal), but route ID are different (and >> it’s mandatory in the same CamelContext). >> >> If you can share a simple project reproducing your issue I can take a look. >> >> Regards >> JB >> >>> Le 9 juil. 2020 à 08:40, Sneharghya Pathak <sppatha...@gmail.com> a >> écrit : >>> >>> Hi JB, >>> >>> As per your recommendation, I set up Karaf 4.2.9 with Camel 2.25.1. I >>> deployed these routes in Karaf, and I am seeing the same thing there too. >>> All the routes in a context are displaying the same name. >>> >>> Regards, >>> Sneharghya >>> >>> On Mon, Jul 6, 2020 at 8:11 PM Sneharghya Pathak <sppatha...@gmail.com> >>> wrote: >>> >>>> Hi JB, >>>> >>>> Please find one of the routes below. >>>> >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0" >>>> xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 >>>> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd >>>> http://camel.apache.org/schema/blueprint >>>> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> >>>> <!-- blueprint property placeholders, that will use etc/constant.cfg >>>> as the properties file --> >>>> <cm:property-placeholder persistent-id="constant"/> >>>> <camelContext xmlns="http://camel.apache.org/schema/blueprint" >>>> id="star"> >>>> * <route id="star-ftpdownload-archive"> <!-- ROUTE ID SET HERE >> -->* >>>> <from uri="ftp: >>>> >> {{star.archive.ftp.connection}}&delete=true&localWorkDirectory=tmp/usdel&include=.*&passiveMode=true&maxMessagesPerPoll=30&delay=1000"/> >>>> >>>> <choice> >>>> <when> >>>> <simple>${header.CamelFileName} regex >>>> '^.*[tT][xX][tT]$'</simple> >>>> <setHeader headerName="Message"><simple>STAR file >>>> downloaded</simple></setHeader> >>>> <to uri="activemq:topic://STAR.Raw"/>ou >>>> </when> >>>> <otherwise> >>>> <setHeader headerName="Message"><simple>STAR file >>>> downloaded is not a valid TXT file</simple></setHeader> >>>> <to uri="activemq:topic://BadFile"/> >>>> </otherwise> >>>> </choice> >>>> </route> >>>> </camelContext> >>>> </blueprint> >>>> >>>> Regards, >>>> Sneharghya >>>> >>>> On Mon, Jul 6, 2020 at 1:24 PM Jean-Baptiste Onofre <j...@nanthrax.net> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> It has been discussed some weeks ago on the dev mailing list. >>>>> >>>>> Parts of ServiceMix (bundles, specs) will move to Karaf and the >>>>> ServiceMix distribution will move to attic. >>>>> >>>>> ServiceMix distribution is outdated and moving directly to Karaf and >>>>> Camel will allow users to use updated versions. >>>>> >>>>> Regards >>>>> JB >>>>> >>>>>> Le 6 juil. 2020 à 09:46, Francois Liot <franc...@liot.org> a écrit : >>>>>> >>>>>> Hi Jean-Baptiste, >>>>>> >>>>>> You do encourage to use Camel in Karaf directly, being one of the most >>>>>> important comiter and part of the Apache Foundation, does it mean you >>>>> are >>>>>> announcing the official end-of-life of ServiceMix ? >>>>>> Let us know, >>>>>> >>>>>> Regards, >>>>>> Francois >>>>>> >>>>>> On Mon, Jul 6, 2020 at 9:35 AM Jean-Baptiste Onofre <j...@nanthrax.net> >>>>> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> How do you set the route ID ? >>>>>>> >>>>>>> By the way, I strongly encourage you to use Camel with Karaf directly >>>>>>> (with updated version) instead of ServiceMix. >>>>>>> >>>>>>> Regards >>>>>>> JB >>>>>>> >>>>>>>> Le 6 juil. 2020 à 09:16, Sneharghya Pathak <sppatha...@gmail.com> a >>>>>>> écrit : >>>>>>>> >>>>>>>> Hello ServiceMix users, >>>>>>>> >>>>>>>> >>>>>>>> I am using ServiceMix 7.0.1 with Camel 2.16.5. The Camel routes have >>>>> been >>>>>>>> written using Blueprint XML. >>>>>>>> >>>>>>>> I have seen a strange behaviour where on deploying the Camel routes, >>>>>>>> ServiceMix is displaying the bundles as active, but the routes are >> not >>>>>>>> installed. I need to redeploy multiple times to get the routes >>>>> running. >>>>>>>> >>>>>>>> The second issue is that, once the routes are running, ServiceMix >>>>> shows >>>>>>> all >>>>>>>> routes in a context as having the same route-id. >>>>>>>> >>>>>>>> Context Route Status >>>>>>>> Total # Failed # Inflight # Uptime >>>>>>>> ------- ----- ------ >>>>>>>> ------- -------- ---------- ------ >>>>>>>> star star-flattoxml Started >>>>>>>> 10225 0 0 1 day 19 hours >>>>>>>> star star-flattoxml Started >>>>>>>> 10225 0 0 1 day 19 hours >>>>>>>> star star-flattoxml Started >>>>>>>> 10225 0 0 1 day 19 hours >>>>>>>> star star-flattoxml Started >>>>>>>> 10225 0 0 1 day 19 hours >>>>>>>> star star-flattoxml Started >>>>>>>> 10225 0 0 1 day 19 hours >>>>>>>> star star-flattoxml Started >>>>>>>> 10225 0 0 1 day 19 hours >>>>>>>> star star-flattoxml Started >>>>>>>> 10225 0 0 1 day 19 hours >>>>>>>> star star-flattoxml Started >>>>>>>> 10225 0 0 1 day 19 hours >>>>>>>> >>>>>>>> Here I know for a fact that all routes in the star context have >>>>> separate >>>>>>>> route ids set in the blueprint xml. >>>>>>>> >>>>>>>> What might be causing this behavior and how should I fix this? >>>>>>>> >>>>>>>> >>>>>>>> Regards, >>>>>>>> >>>>>>>> Sneharghya >>>>>>> >>>>>>> >>>>> >>>>> >> >>