Re: Apache Camel deadlock on heavy load!

2022-10-20 Thread Zheng Feng
Hi,

Is it possible to check with the latest 3.19.0 release to see if it works?

On Fri, Oct 21, 2022 at 1:35 AM hakim hejam  wrote:

> Hello,
> We notice under some circumstances of heavy load and request (more the 1000
> requests at the same time), threads used by Camel are still in a waiting
> state and block the caller thread. This behavior occurs when using
> multicast and split, but only when we have configured a timeout on our
> routes.
> We reproduce it in a simple test as below, we use the 3.16.0 version with
> openjdk 11
> could you help with that?
> Thank you
>
> import org.apache.camel.CamelContext;
> import org.apache.camel.Exchange;
> import org.apache.camel.FluentProducerTemplate;
> import org.apache.camel.Processor;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.impl.DefaultCamelContext;
> import org.apache.camel.impl.engine.DefaultFluentProducerTemplate;
> import org.apache.camel.processor.aggregate.StringAggregationStrategy;
> import org.apache.camel.processor.aggregate.UseLatestAggregationStrategy;
>
> import java.util.concurrent.ThreadLocalRandom;
> import java.util.concurrent.atomic.AtomicLong;
> import java.util.stream.IntStream;
>
> public class CamelTester {
>
> private static final AtomicLong START_TIME = new AtomicLong();
>
> public static void main(String[] args) throws Exception {
> CamelContext camelContext = startCamel();
> FluentProducerTemplate fluentProducerTemplate =
> DefaultFluentProducerTemplate
> .on(camelContext)
> .withTemplateCustomizer(
> template -> {
> template.setMaximumCacheSize(100);
> }
> );
>
> IntStream.range(1, 2000).forEach(i -> {
> new Thread(() -> {
> fluentProducerTemplate
> .withBody("message-" + i)
> .to("direct:start")
> .send();
> }).start();
> });
>
> Thread.sleep(24 * 60 * 60 * 1000);
> }
>
> private static CamelContext startCamel() throws Exception {
> log("start Camel Context...");
> CamelContext camelContext = new DefaultCamelContext();
> camelContext.addRoutes(createBasicRoute(camelContext));
> camelContext.start();
> return camelContext;
> }
>
> static RouteBuilder createBasicRoute(CamelContext camelContext) {
> return new RouteBuilder() {
> @Override
> public void configure() throws Exception {
> from("direct:start")
> .multicast().parallelProcessing()
> .aggregationStrategy(new
> StringAggregationStrategy())
> .timeout(1)
> .to("direct:a")
> .to("direct:b")
> .to("direct:c")
> .to("direct:def")
> .end()
> .to("file:c:/tmp/outbox?charset=iso-8859-1");
>
> from("direct:def").routeId("def")
>
> .split(body().tokenize("message-")).parallelProcessing()
> .aggregationStrategy(new
> StringAggregationStrategy())
> .timeout(1)
> .to("direct:d")
> .to("direct:e")
> .to("direct:f")
> .end();
>
> from("direct:a").routeId("a")
> .process(new CustomProcessor("route-A"));
> from("direct:b").routeId("b")
> .process(new CustomProcessor("route-B"));
> from("direct:c").routeId("c")
> .process(new CustomProcessor("route-C"));
> from("direct:d").routeId("d")
> .process(new CustomProcessor("route-D"));
> from("direct:e").routeId("e")
> .process(new CustomProcessor("route-E"));
> from("direct:f").routeId("f")
> .process(new CustomProcessor("route-F"));
>
> }
> };
> }
> public static void log(String msg) {
> long now = System.currentTimeMillis();
> START_TIME.compareAndSet(0, now);
> long elapsed = now - START_TIME.get();
> String name = Thread.currentThread().getName();
> System.out.format("%2$-4s %1$-26s%3$s\n", name, elapsed, msg);
> }
>
> static private class CustomProcessor implements Processor {
> String routeId;
>
> public CustomProcessor(String route) {
> this.routeId = route;
> }
>
> @Override
> public void process(Exchange exchange) throws Exception {
> log("Start processing for the route " + routeId + " " +
> 

Re: Apache Camel Exception Handling doubt

2022-06-19 Thread ski n
s:
>
> @Component
> public class MyCustomErrorHandler extends RouteConfigurationBuilder {
>
>@Override
>public void configuration() throws Exception {
>   routeConfiguration("test-route-configuration-id")
>   .onException(Exception.class)
>  .handled(true)  // discard the msg
>  .log(LoggingLevel.INFO, ">>>>> Hit this custom error handler:
> ${exception.message}")
>  .end();
>}
> }
>
>
> 
> From: ski n 
> Sent: June 17, 2022 8:28 AM
> To: users@camel.apache.org
> Subject: Re: Apache Camel Exception Handling doubt
>
> Hi,
>
> It's good to provide a code example to see what you tried.
>
> Have you also tried to combine it with route configuration?
>
> https://camel.apache.org/manual/route-configuration.html
>
> This is available from 3.12.
>
> Raymond
>
> On Thu, Jun 16, 2022 at 7:43 PM j vh  wrote:
>
> > Hello,
> > btw... I'm using Camel 3.13.0 for this work.
> > ...jvh003
>


Re: Apache Camel Exception Handling doubt

2022-06-17 Thread j vh
Hi Raymond,
Thanks for the suggestion. But seems that defining exception handling via the 
RouteConfigurationBuilder doesn't work either.
Let me further explain with some piece of code.
Maybe this will trigger some thoughts as you'll be able to see what I'm trying 
to do here.

Hi-level overview:
- 2 projects: 1 camel template base jar and 1 springboot camel application 
(that builds its route using the template from the other project).
- the base jar builds a route template
- the application jar builds a route using the template from the base jar
- the desire here is to do some extra customization in the application (at 
templated-route creation time) to setup extra exception handling that is not 
included in the base template.
- I have also tried to define global level exception handling using 
onException() in my application project's configure() method. But this is not 
catching anything either.

Thanks,
jvh

ps: the post in between here by Ephemeris Lappis seems to be targeted for a 
different thread.   :-)

Code snippets:
1) Base project route configure method:

@Override
public void configure() {
  final RouteTemplateDefinition rtd = routeTemplate("route-template-1")
.templateParameter("queue-name")
.templateParameter("rest-endpoint")

.from("jmsBroker:queue:{{queue-name}}")
// .routeConfigurationId("test-route-configuration-id")// tried 
to add (and remove the local .onException from here)

   .onException(ConnectException.class)
  .handled(false)
  .log(LoggingLevel.ERROR, logger, "--> Exception: 
${exception.message}, Delivery was rolled back")
  .end()

 .process(restHeaderProcessor)
 .to("{{rest-endpoint}}")
 .log(LoggingLevel.INFO, logger, "Message sent, ResponseCode: 
${header.CamelHttpResponseCode}");
}

2) Application project configure method, building route from base project 
template:

@Override
public void configure() {
  final String route = TemplatedRouteBuilder.builder(camelContext, 
"route-template-1")
.routeId("route-jms-to-rest")
.parameter("myQueue")
.parameter("http://localhost:9000/myRestEndpoint;)
.add();
  log.info("buildTemplatedRoute() created templated route: {}", route);
}

3)  Application project Configuration spring boot component class:

@Component
public class MyCustomErrorHandler extends RouteConfigurationBuilder {

   @Override
   public void configuration() throws Exception {
  routeConfiguration("test-route-configuration-id")
  .onException(Exception.class)
 .handled(true)  // discard the msg
 .log(LoggingLevel.INFO, ">>>>> Hit this custom error handler: 
${exception.message}")
 .end();
   }
}



From: ski n 
Sent: June 17, 2022 8:28 AM
To: users@camel.apache.org
Subject: Re: Apache Camel Exception Handling doubt

Hi,

It's good to provide a code example to see what you tried.

Have you also tried to combine it with route configuration?

https://camel.apache.org/manual/route-configuration.html

This is available from 3.12.

Raymond

On Thu, Jun 16, 2022 at 7:43 PM j vh  wrote:

> Hello,
> btw... I'm using Camel 3.13.0 for this work.
> ...jvh003


Re: Apache Camel Exception Handling doubt

2022-06-17 Thread Ephemeris Lappis
Hello.

Ideally, I'd like to replace the long repetitive code from all the
existing projects blueprints (and future projects too). We have
something like the following sequence in every project :


http://www.osgi.org/xmlns/blueprint/v1.0.0;
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0;
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprintz.xsd
http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd;>






 





http://camel.apache.org/schema/blueprint;>

And it should be easier to manage provided services, beans and so on
changing only the CamelContext or its associated registry. Something
like that :


http://www.osgi.org/xmlns/blueprint/v1.0.0;
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0;
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprintz.xsd
http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd;>



http://camel.apache.org/schema/blueprint;>

Then, adding new services from an external part of the system doesn't
need projects modifications any more.
What is my problem, is what kind of "hook" I can use to change the
CamelContext a,d/or its Registry.

Is it clearer ?

Anyway, thanks again for your help.

Regards.

Le ven. 17 juin 2022 à 14:28, ski n  a écrit :
>
> Hi,
>
> It's good to provide a code example to see what you tried.
>
> Have you also tried to combine it with route configuration?
>
> https://camel.apache.org/manual/route-configuration.html
>
> This is available from 3.12.
>
> Raymond
>
> On Thu, Jun 16, 2022 at 7:43 PM j vh  wrote:
>
> > Hello,
> > btw... I'm using Camel 3.13.0 for this work.
> > ...jvh003


Re: Apache Camel Exception Handling doubt

2022-06-17 Thread ski n
Hi,

It's good to provide a code example to see what you tried.

Have you also tried to combine it with route configuration?

https://camel.apache.org/manual/route-configuration.html

This is available from 3.12.

Raymond

On Thu, Jun 16, 2022 at 7:43 PM j vh  wrote:

> Hello,
> btw... I'm using Camel 3.13.0 for this work.
> ...jvh003


Re: Apache Camel Exception Handling doubt

2022-06-16 Thread j vh
Hello,
btw... I'm using Camel 3.13.0 for this work.
...jvh003

RE: Apache Camel Exception Handling doubt

2022-06-16 Thread j vh
Hello,
I am also trying to use global exception configuration in a Camel route that is 
built from a template. The template is created ok and the route created from it 
is also ok & working. But the global exception handling is not working as 
expected.

Maybe there is another way to customize the exception handling in the route 
built from the template?

For example is there some way using a bean?
Or maybe via the .configure that is documented here: 
https://camel.apache.org/manual/route-template.html.

Thanks,
jvh003

On 2022/03/31 15:32:21 "Chawla, Manan" wrote:
> Hey,
> I am trying to integrate Global OnException block with route template but the 
> onException block isn’t getting executed. Can you please suggest me a way to 
> get around this issue?
> Thank you
> Regards,
> Manan Chawla
> 

Re: Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

2022-03-16 Thread Bert Speckels
Sure, I can try :-)

First of all I add the following *dependency to my camel projects pom.xml*


org.apache.camel
camel-management


Then I *start my camel application* with the following VM parameter:

-javaagent:./jolokia-jvm-1.7.1.jar=port=,host=localhost
(the jolokai JAR is stored in my project folder right beside the pom.xml)

Then I *start hawt.io * (via jar or embedded):

java -jar hawtio-app-2.14.5.jar

When all was successful you should be able to *connect* to you camel
application via hawt.to and see a *Camel navigation menu*

http://localhost:8080/hawtio/jvm/connect

There are some more settings to *activate debugging* like
camelContest.setDebugging(true) but these are the required steps to access
Camel JMX via hawt.io.

Don't misundertand the phrase "embedded" concerning hawt.io deployment:
As far as I know this does *not* mean that you *embed hawt.io
 into your own Camel application*.
Embedding means that you write your own "starter application" for hawt.io
instead of starting it via JAR file (like above example) or web container
like tomcat or jetty.
To anyone listening here: Please correct me if I am wrong!

Good look and talk back again if not successful.
Bert Speckels, Germany




Am Mi., 16. März 2022 um 15:23 Uhr schrieb Chirag :

> Bert,
>
> I am trying to build something similar.
> can you point me in the right direction to enabling Jolokia with
> hawtio and camel-main?
> I am currently running embedded hawtio.
>
> ચિરાગ/चिराग/Chirag
> --
> Sent from My Gmail Account
>
> On Mon, Mar 14, 2022 at 2:50 AM Bert Speckels 
> wrote:
> >
> > Yes, maybe. But yesterday evening the situation has changed:
> >
> > After some changes concerning other aspects of my application (like
> > assigning an ID to most of the route nodes) debugging works now
> > including the display of body and headers.
> >
> > I have no clue what changed to make it work.
> > And at the same time my application property
> > "camel.main.debugging=true" failed on startup:
> >
> > Error binding property (camel.main.debugging=true) with name:
> > debugging on bean: org.apache.camel.main.MainConfigurationProperties
> >
> > I had to enabled debugging at the context like this:
> > getContext().setDebugging(true);
> >
> > Has anybody any idea?
> >
> > Am Mo., 14. März 2022 um 06:46 Uhr schrieb Tadayoshi Sato
> > :
> > >
> > > Hi Bert,
> > >
> > > It's likely that the problem is in Hawtio. Hawtio is not yet updated
> with the latest Camel versions.
> > > Feel free to file your issue at
> https://github.com/hawtio/hawtio-integration/issues
> > >
> > > Thanks,
> > > Tadayoshi
> > >
> > > On Mon, Mar 14, 2022 at 3:20 AM Bert Speckels 
> wrote:
> > >>
> > >> Hi
> > >>
> > >> I am quite new with Apache Camel and assigned to this mailing list
> > >> just a few minutes ago.
> > >> So please be kind to me :-D
> > >>
> > >> ---
> > >>
> > >> Until now I was very successful with using Camel. It is exactly what
> > >> we need for our project.
> > >> But I wouldn't write here if I didn't have a problem ...
> > >>
> > >> I'm currently working with Apache Camel and hawt.io for monitoring
> and
> > >> debugging my Camel routes.
> > >> This works wonderfully, even if some important information is somewhat
> > >> hidden in the documentation. For example, it took me a bit to turn on
> > >> debugging.
> > >>
> > >> However, if I set a breakpoint in debugging mode then the message
> > >> processing stops at that point in the route.
> > >> My problem is that I can't see any "body" or "headers" of the Camel
> > >> Exchange at that point.
> > >>
> > >> I've tried all sorts of settings:
> > >> - tracing / backlog tracing enabled on CamelContext
> > >> - tracing / backlog tracing enabled on route
> > >> - Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".
> > >>
> > >> On the other side tracing works: If I activate tracing in the "Trace"
> > >> tab, I can see the flow of my messages through all nodes of the route.
> > >> Only in "Debugging" tab there is no body nor header when  the route
> > >> stopped at the breakpoint.
> > >>
> > >> Here is some information:
> > >>
> > >> - I don't use any special framework: Plain old Java with a Main method
> > >> in which I start Camel-Main.
> > >> - Apache Camel: 3.14.1
> > >> - Jolokai Agent: 1.7.1
> > >> - hawt.io: 2.14.5
> > >> - Exchange body type: DOMSource
> > >>
> > >> Maybe anyone has an idea what I can try to get the exchange content
> > >> while debugging via jmx/hawt.io
> > >>
> > >> This is my route:
> > >>
> > >> getCamelContext().setBacklogTracing(true);
> > >>
> > >> --
> > >> from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms",
> "username"))
> > >>   .routeGroup("Workflow")
> > >>   .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
> > >>   .routeDescription("Mapping of TSO11 Message to NMS42")
> > >>   .convertBodyTo(DOMSource.class)
> > >>   

Re: Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

2022-03-16 Thread Chirag
Bert,

I am trying to build something similar.
can you point me in the right direction to enabling Jolokia with
hawtio and camel-main?
I am currently running embedded hawtio.

ચિરાગ/चिराग/Chirag
--
Sent from My Gmail Account

On Mon, Mar 14, 2022 at 2:50 AM Bert Speckels  wrote:
>
> Yes, maybe. But yesterday evening the situation has changed:
>
> After some changes concerning other aspects of my application (like
> assigning an ID to most of the route nodes) debugging works now
> including the display of body and headers.
>
> I have no clue what changed to make it work.
> And at the same time my application property
> "camel.main.debugging=true" failed on startup:
>
> Error binding property (camel.main.debugging=true) with name:
> debugging on bean: org.apache.camel.main.MainConfigurationProperties
>
> I had to enabled debugging at the context like this:
> getContext().setDebugging(true);
>
> Has anybody any idea?
>
> Am Mo., 14. März 2022 um 06:46 Uhr schrieb Tadayoshi Sato
> :
> >
> > Hi Bert,
> >
> > It's likely that the problem is in Hawtio. Hawtio is not yet updated with 
> > the latest Camel versions.
> > Feel free to file your issue at 
> > https://github.com/hawtio/hawtio-integration/issues
> >
> > Thanks,
> > Tadayoshi
> >
> > On Mon, Mar 14, 2022 at 3:20 AM Bert Speckels  
> > wrote:
> >>
> >> Hi
> >>
> >> I am quite new with Apache Camel and assigned to this mailing list
> >> just a few minutes ago.
> >> So please be kind to me :-D
> >>
> >> ---
> >>
> >> Until now I was very successful with using Camel. It is exactly what
> >> we need for our project.
> >> But I wouldn't write here if I didn't have a problem ...
> >>
> >> I'm currently working with Apache Camel and hawt.io for monitoring and
> >> debugging my Camel routes.
> >> This works wonderfully, even if some important information is somewhat
> >> hidden in the documentation. For example, it took me a bit to turn on
> >> debugging.
> >>
> >> However, if I set a breakpoint in debugging mode then the message
> >> processing stops at that point in the route.
> >> My problem is that I can't see any "body" or "headers" of the Camel
> >> Exchange at that point.
> >>
> >> I've tried all sorts of settings:
> >> - tracing / backlog tracing enabled on CamelContext
> >> - tracing / backlog tracing enabled on route
> >> - Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".
> >>
> >> On the other side tracing works: If I activate tracing in the "Trace"
> >> tab, I can see the flow of my messages through all nodes of the route.
> >> Only in "Debugging" tab there is no body nor header when  the route
> >> stopped at the breakpoint.
> >>
> >> Here is some information:
> >>
> >> - I don't use any special framework: Plain old Java with a Main method
> >> in which I start Camel-Main.
> >> - Apache Camel: 3.14.1
> >> - Jolokai Agent: 1.7.1
> >> - hawt.io: 2.14.5
> >> - Exchange body type: DOMSource
> >>
> >> Maybe anyone has an idea what I can try to get the exchange content
> >> while debugging via jmx/hawt.io
> >>
> >> This is my route:
> >>
> >> getCamelContext().setBacklogTracing(true);
> >>
> >> --
> >> from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms", "username"))
> >>   .routeGroup("Workflow")
> >>   .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
> >>   .routeDescription("Mapping of TSO11 Message to NMS42")
> >>   .convertBodyTo(DOMSource.class)
> >>   .log("Message for '$simple{header:tenant}' received")
> >>   .process(tso11ToNmsMappingProcessor)
> >>   .to("xslt:xslt/tso11-to-nms42.xslt")
> >>   .to("direct:send");
> >> --
> >>
> >> ANd these are current properties:
> >>
> >> --
> >> camel.main.name=TSO11
> >> camel.main.jmxEnabled=true
> >> camel.main.debugging=true
> >> camel.main.backlogTracing=true
> >> camel.main.lightweight=false
> >> camel.main.tracing=false
> >> camel.main.useBreadcrumb=true
> >> --
> >>
> >> Thanks for reading
> >> With kind regards
> >
> >
> >
> > --
> > Tadayoshi Sato


Re: Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

2022-03-14 Thread Bert Speckels
Yes, maybe. But yesterday evening the situation has changed:

After some changes concerning other aspects of my application (like
assigning an ID to most of the route nodes) debugging works now
including the display of body and headers.

I have no clue what changed to make it work.
And at the same time my application property
"camel.main.debugging=true" failed on startup:

Error binding property (camel.main.debugging=true) with name:
debugging on bean: org.apache.camel.main.MainConfigurationProperties

I had to enabled debugging at the context like this:
getContext().setDebugging(true);

Has anybody any idea?

Am Mo., 14. März 2022 um 06:46 Uhr schrieb Tadayoshi Sato
:
>
> Hi Bert,
>
> It's likely that the problem is in Hawtio. Hawtio is not yet updated with the 
> latest Camel versions.
> Feel free to file your issue at 
> https://github.com/hawtio/hawtio-integration/issues
>
> Thanks,
> Tadayoshi
>
> On Mon, Mar 14, 2022 at 3:20 AM Bert Speckels  wrote:
>>
>> Hi
>>
>> I am quite new with Apache Camel and assigned to this mailing list
>> just a few minutes ago.
>> So please be kind to me :-D
>>
>> ---
>>
>> Until now I was very successful with using Camel. It is exactly what
>> we need for our project.
>> But I wouldn't write here if I didn't have a problem ...
>>
>> I'm currently working with Apache Camel and hawt.io for monitoring and
>> debugging my Camel routes.
>> This works wonderfully, even if some important information is somewhat
>> hidden in the documentation. For example, it took me a bit to turn on
>> debugging.
>>
>> However, if I set a breakpoint in debugging mode then the message
>> processing stops at that point in the route.
>> My problem is that I can't see any "body" or "headers" of the Camel
>> Exchange at that point.
>>
>> I've tried all sorts of settings:
>> - tracing / backlog tracing enabled on CamelContext
>> - tracing / backlog tracing enabled on route
>> - Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".
>>
>> On the other side tracing works: If I activate tracing in the "Trace"
>> tab, I can see the flow of my messages through all nodes of the route.
>> Only in "Debugging" tab there is no body nor header when  the route
>> stopped at the breakpoint.
>>
>> Here is some information:
>>
>> - I don't use any special framework: Plain old Java with a Main method
>> in which I start Camel-Main.
>> - Apache Camel: 3.14.1
>> - Jolokai Agent: 1.7.1
>> - hawt.io: 2.14.5
>> - Exchange body type: DOMSource
>>
>> Maybe anyone has an idea what I can try to get the exchange content
>> while debugging via jmx/hawt.io
>>
>> This is my route:
>>
>> getCamelContext().setBacklogTracing(true);
>>
>> --
>> from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms", "username"))
>>   .routeGroup("Workflow")
>>   .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
>>   .routeDescription("Mapping of TSO11 Message to NMS42")
>>   .convertBodyTo(DOMSource.class)
>>   .log("Message for '$simple{header:tenant}' received")
>>   .process(tso11ToNmsMappingProcessor)
>>   .to("xslt:xslt/tso11-to-nms42.xslt")
>>   .to("direct:send");
>> --
>>
>> ANd these are current properties:
>>
>> --
>> camel.main.name=TSO11
>> camel.main.jmxEnabled=true
>> camel.main.debugging=true
>> camel.main.backlogTracing=true
>> camel.main.lightweight=false
>> camel.main.tracing=false
>> camel.main.useBreadcrumb=true
>> --
>>
>> Thanks for reading
>> With kind regards
>
>
>
> --
> Tadayoshi Sato


Re: Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

2022-03-13 Thread Tadayoshi Sato
Hi Bert,

It's likely that the problem is in Hawtio. Hawtio is not yet updated with
the latest Camel versions.
Feel free to file your issue at
https://github.com/hawtio/hawtio-integration/issues

Thanks,
Tadayoshi

On Mon, Mar 14, 2022 at 3:20 AM Bert Speckels 
wrote:

> Hi
>
> I am quite new with Apache Camel and assigned to this mailing list
> just a few minutes ago.
> So please be kind to me :-D
>
> ---
>
> Until now I was very successful with using Camel. It is exactly what
> we need for our project.
> But I wouldn't write here if I didn't have a problem ...
>
> I'm currently working with Apache Camel and hawt.io for monitoring and
> debugging my Camel routes.
> This works wonderfully, even if some important information is somewhat
> hidden in the documentation. For example, it took me a bit to turn on
> debugging.
>
> However, if I set a breakpoint in debugging mode then the message
> processing stops at that point in the route.
> My problem is that I can't see any "body" or "headers" of the Camel
> Exchange at that point.
>
> I've tried all sorts of settings:
> - tracing / backlog tracing enabled on CamelContext
> - tracing / backlog tracing enabled on route
> - Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".
>
> On the other side tracing works: If I activate tracing in the "Trace"
> tab, I can see the flow of my messages through all nodes of the route.
> Only in "Debugging" tab there is no body nor header when  the route
> stopped at the breakpoint.
>
> Here is some information:
>
> - I don't use any special framework: Plain old Java with a Main method
> in which I start Camel-Main.
> - Apache Camel: 3.14.1
> - Jolokai Agent: 1.7.1
> - hawt.io: 2.14.5
> - Exchange body type: DOMSource
>
> Maybe anyone has an idea what I can try to get the exchange content
> while debugging via jmx/hawt.io
>
> This is my route:
>
> getCamelContext().setBacklogTracing(true);
>
> --
> from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms", "username"))
>   .routeGroup("Workflow")
>   .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
>   .routeDescription("Mapping of TSO11 Message to NMS42")
>   .convertBodyTo(DOMSource.class)
>   .log("Message for '$simple{header:tenant}' received")
>   .process(tso11ToNmsMappingProcessor)
>   .to("xslt:xslt/tso11-to-nms42.xslt")
>   .to("direct:send");
> --
>
> ANd these are current properties:
>
> --
> camel.main.name=TSO11
> camel.main.jmxEnabled=true
> camel.main.debugging=true
> camel.main.backlogTracing=true
> camel.main.lightweight=false
> camel.main.tracing=false
> camel.main.useBreadcrumb=true
> --
>
> Thanks for reading
> With kind regards
>


-- 
Tadayoshi Sato


Re: Apache Camel, SpringBoot application in PCF results with message failures

2022-02-16 Thread Claus Ibsen
Hi

When you run workloads on cloud platforms you need to consider sizing
- how much cpu cores and memory do you have?
And then build and configure your Camel application accordingly.

For example the split in parallel mode will use a default thread pool
of 10-20 threads an so if you have 30 routes that is 30x that.
Instead of private pool per route, you can create one pool and share
it for all 30 routes.

Also mind that 30 routes that run concurrently may not run faster when
you have limited cpu cores.


On Fri, Jan 28, 2022 at 2:00 PM PraveenKumar KG  wrote:
>
> Hi,
>
> We have developed Apache Came, SpringBoot based application to read data
> from Oracle table and do some transformation of record and publish to Kafka
> topic. We are using Camel SQL component for DB integration and implemented
> Split & parallel processing pattern to parallelize processing to achieve
> high throughput. Oracle tables are partitioned, so we are creating multiple
> routes, one route per table partition, to speed up the processing. We have
> 30 partitions in table and so created 30 routes.
>
>from(buildSelectSqlEndpoint(routeId))
> .process(new GenericEventProcessor("MessagesReceived"))
> .split(body())
> .parallelProcessing()
> .process(new
> GenericEventProcessor("SplitAndParallelProcessing"))
> .process(new InventoryProcessor())
> .process(new GenericEventProcessor("ConvertedToAvroFormat"))
> .to(buildKafkaProducerEndPoint(routeId));
>
> I tested the application in local laptop with an adequate load and it is
> processing as expected. But when we deployed the application in PCF, we see
> some of the threads are failing. I have enabled the Camel debug log and i
> see below debug log line -
>
> Pipeline - Message exchange has failed: so breaking out of pipeline for
> exchange Due to these thousands of messages are not published to Kafka.
>
> From initial analysis, i figured out Camel is creating one thread for each
> route and based on *maxMessagePerPoll* configuration, it creates number of
> threads equal to *maxMessagePerPoll*. With Split & parallel processing
> enabled, Camel creates additional threads equal to *maxMessagePerPoll* for
> Kafka publish. with this approach, we will have hundreds of threads created
> and not sure any issue with PCF. Also I tried number of routes with 2, to
> check the message delivery failures, and still see hundreds of failures and
> with only 2 routes, increases total processing time for millions of records.
>
> Could you please let me know, how to use Apache Camel with containers like
> PCF? any additional configurations we need to have in PCF or Camel ?
>
>
>
> Thanks & Regards
> Praveen KG



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


Re: Apache Camel - Jolt Remote Spec Issue

2022-01-06 Thread Karen Lease

Hello Gaurav,

Maybe it's a silly question but are you sure the URL is accessible 
without providing some authentication? The one in the example below 
returns an access denied error if I put it in my browser.
What error are you getting in Camel? And please tell us which Camel 
version you're using.


Regards,
Karen

On 29/12/2021 13:00, Gaurav Verma wrote:

Hi Team,

I am trying to use a remote spec json file with jolt endpoint but shift
operation is not working as expected while it works fine if I use the same
spec file in my local.

Working code:

from(rabbitmqUri)
   .transform(body().convertTo(String.class))
   
.to("jolt:/specs/securecx-to-pragma-spec.json?inputType=JsonString=JsonString")

Not Working Code:

from(rabbitmqUri)
   .transform(body().convertTo(String.class))
   
.to("jolt:http://storage.googleapis.com/asia.artifacts.apigee-sample-2021.appspot.com/specs/securecxToPragmaSpec.json?inputType=JsonString=JsonString;)

Input Json:
{
"ssoId": "b...@cnx.com",
"violationType": "phone",
"violationMessageTitle": "phone detected",
"violationMessageDesc": "phone detected at back"
}

Expected Json:

{
"ssoId" : "b...@cnx.com",
"messageDetails" : {
"title" : "phone detected",
"desc" : "phone detected at back"
}
}



Spec Used:

[
{
"operation": "shift",
"spec": {
"ssoId": "ssoId",
"violationMessageTitle": "messageDetails.title",
"violationMessageDesc": "messageDetails.desc"
}
}
]



Please help in identifying the cause and suggest the solution.



Re: Apache Camel-k metrics in rancher embedded prometheus

2021-11-29 Thread Antonin Stefanutti
It generally takes some time for metrics to "show up", depending on the 
Prometheus instance configuration:

https://github.com/prometheus-operator/prometheus-operator/blob/787f54b055f797464d5832ace1c7f8318321c87a/Documentation/api.md

That may explain why restarting seems to fix the issue, as it forces a scrape 
cycle.

You may have to lower settings like scrapeInterval, evaluationInterval... These 
are probably better asking the Prometheus project, as it's already beyond my 
knowledge and the scope of the Camel K project.  

> On 29 Nov 2021, at 16:04, Roberto Camelk  wrote:
> 
> Antonin, hi.
> 
> I'm getting a problem in my prometheus operator about the podmonitor
> discovery
> 
> When I start a new integration, it's not discovered by the prometheus
> operator! I need to restart the pod operator to my integration to be
> discovered and scraped
> 
> This is my Prometheus object in k8s:
> 
> 
> apiVersion: monitoring.coreos.com/v1
> kind: Prometheus
> metadata:
>  annotations:
>kubectl.kubernetes.io/last-applied-configuration: |
>  
> {"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"annotations":{"project.cattle.io/namespaces":"[\"cattle-prometheus\",\"cattle-system\",\"kube-node-lease\",\"kube-public\",\"kube-sy$
>project.cattle.io/namespaces:
> '["cattle-prometheus","cattle-system","kube-node-lease","kube-public","kube-system","security-scan"]'
>  generation: 23
>  labels:
>app: prometheus
>chart: prometheus-0.0.1
>heritage: Tiller
>io.cattle.field/appId: cluster-monitoring
>release: cluster-monitoring
>  name: cluster-monitoring
>  namespace: cattle-prometheus
>  resourceVersion: "68969602"
> spec:
>  additionalAlertManagerConfigs:
>key: additional-alertmanager-configs.yaml
>name: prometheus-cluster-monitoring-additional-alertmanager-configs
>  additionalScrapeConfigs:
>key: additional-scrape-configs.yaml
>name: prometheus-cluster-monitoring-additional-scrape-configs
>  affinity:
>podAntiAffinity:
>  preferredDuringSchedulingIgnoredDuringExecution:
>  - podAffinityTerm:
>  labelSelector:
>matchLabels:
>  app: prometheus
>  prometheus: cluster-monitoring
>  topologyKey: kubernetes.io/hostname
>weight: 100
>  arbitraryFSAccessThroughSMs: {}
>  baseImage: rancher/prom-prometheus
>  configMaps:
>  - prometheus-cluster-monitoring-nginx
>  containers:
>  - command:
>- /bin/sh
>- -c
>- cp /nginx/run-sh.tmpl /var/cache/nginx/nginx-start.sh; chmod +x
> /var/cache/nginx/nginx-start.sh;
>  /var/cache/nginx/nginx-start.sh
>env:
>- name: POD_IP
>  valueFrom:
>fieldRef:
>  fieldPath: status.podIP
>image: rancher/nginx:1.17.4-alpine
>name: prometheus-proxy
>ports:
>- containerPort: 8080
>  name: nginx-http
>  protocol: TCP
>resources:
>  limits:
>cpu: 100m
>memory: 100Mi
>  requests:
>cpu: 50m
>memory: 50Mi
>securityContext:
>  runAsGroup: 101
>  runAsUser: 101
>volumeMounts:
>- mountPath: /nginx
>  name: configmap-prometheus-cluster-monitoring-nginx
>- mountPath: /var/cache/nginx
>  name: nginx-home
>  - args:
>- --proxy-url=http://127.0.0.1:9090
>- --listen-address=$(POD_IP):9090
>- --filter-reader-labels=prometheus
>- --filter-reader-labels=prometheus_replica
>command:
>- prometheus-auth
>env:
>- name: POD_IP
>  valueFrom:
>fieldRef:
>  fieldPath: status.podIP
>image: rancher/prometheus-auth:v0.2.0
>livenessProbe:
>  failureThreshold: 6
>  httpGet:
>path: /-/healthy
>port: web
>scheme: HTTP
>  initialDelaySeconds: 300
>  periodSeconds: 10
>  successThreshold: 1
>  timeoutSeconds: 10
>name: prometheus-agent
>ports:
>- containerPort: 9090
>  name: web
>  protocol: TCP
>readinessProbe:
>  failureThreshold: 10
>  httpGet:
>path: /-/ready
>port: web
>scheme: HTTP
>  initialDelaySeconds: 60
>  periodSeconds: 10
>  successThreshold: 1
>  timeoutSeconds: 10
>resources:
>  limits:
>cpu: 500m
>memory: 200Mi
>  requests:
>cpu: 100m
>memory: 100Mi
>  evaluationInterval: 60s
>  externalLabels:
>prometheus_from: arquitetura
>  listenLocal: true
>  logFormat: logfmt
>  logLevel: info
>  nodeSelector:
>kubernetes.io/os: linux
>  podMetadata:
>labels:
>labels:
>  app: prometheus
>  chart: prometheus-0.0.1
>  release: cluster-monitoring
>  podMonitorNamespaceSelector: {}
>  podMonitorSelector:
>matchLabels:
>  app: camel-k
>  replicas: 1
>  resources:
>limits:
>  cpu: "1"
>  memory: 1000Mi
>requests:
>  cpu: 750m
>  memory: 750Mi
>  retention: 12h
>  ruleNamespaceSelector:
>matchExpressions:
>- key: field.cattle.io/projectId
>  operator: In
>  

Re: Apache Camel-k metrics in rancher embedded prometheus

2021-11-29 Thread Roberto Camelk
Antonin, hi.

I'm getting a problem in my prometheus operator about the podmonitor
discovery

When I start a new integration, it's not discovered by the prometheus
operator! I need to restart the pod operator to my integration to be
discovered and scraped

This is my Prometheus object in k8s:


apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  annotations:
kubectl.kubernetes.io/last-applied-configuration: |
  
{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"annotations":{"project.cattle.io/namespaces":"[\"cattle-prometheus\",\"cattle-system\",\"kube-node-lease\",\"kube-public\",\"kube-sy$
project.cattle.io/namespaces:
'["cattle-prometheus","cattle-system","kube-node-lease","kube-public","kube-system","security-scan"]'
  generation: 23
  labels:
app: prometheus
chart: prometheus-0.0.1
heritage: Tiller
io.cattle.field/appId: cluster-monitoring
release: cluster-monitoring
  name: cluster-monitoring
  namespace: cattle-prometheus
  resourceVersion: "68969602"
spec:
  additionalAlertManagerConfigs:
key: additional-alertmanager-configs.yaml
name: prometheus-cluster-monitoring-additional-alertmanager-configs
  additionalScrapeConfigs:
key: additional-scrape-configs.yaml
name: prometheus-cluster-monitoring-additional-scrape-configs
  affinity:
podAntiAffinity:
  preferredDuringSchedulingIgnoredDuringExecution:
  - podAffinityTerm:
  labelSelector:
matchLabels:
  app: prometheus
  prometheus: cluster-monitoring
  topologyKey: kubernetes.io/hostname
weight: 100
  arbitraryFSAccessThroughSMs: {}
  baseImage: rancher/prom-prometheus
  configMaps:
  - prometheus-cluster-monitoring-nginx
  containers:
  - command:
- /bin/sh
- -c
- cp /nginx/run-sh.tmpl /var/cache/nginx/nginx-start.sh; chmod +x
/var/cache/nginx/nginx-start.sh;
  /var/cache/nginx/nginx-start.sh
env:
- name: POD_IP
  valueFrom:
fieldRef:
  fieldPath: status.podIP
image: rancher/nginx:1.17.4-alpine
name: prometheus-proxy
ports:
- containerPort: 8080
  name: nginx-http
  protocol: TCP
resources:
  limits:
cpu: 100m
memory: 100Mi
  requests:
cpu: 50m
memory: 50Mi
securityContext:
  runAsGroup: 101
  runAsUser: 101
volumeMounts:
- mountPath: /nginx
  name: configmap-prometheus-cluster-monitoring-nginx
- mountPath: /var/cache/nginx
  name: nginx-home
  - args:
- --proxy-url=http://127.0.0.1:9090
- --listen-address=$(POD_IP):9090
- --filter-reader-labels=prometheus
- --filter-reader-labels=prometheus_replica
command:
- prometheus-auth
env:
- name: POD_IP
  valueFrom:
fieldRef:
  fieldPath: status.podIP
image: rancher/prometheus-auth:v0.2.0
livenessProbe:
  failureThreshold: 6
  httpGet:
path: /-/healthy
port: web
scheme: HTTP
  initialDelaySeconds: 300
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 10
name: prometheus-agent
ports:
- containerPort: 9090
  name: web
  protocol: TCP
readinessProbe:
  failureThreshold: 10
  httpGet:
path: /-/ready
port: web
scheme: HTTP
  initialDelaySeconds: 60
  periodSeconds: 10
  successThreshold: 1
  timeoutSeconds: 10
resources:
  limits:
cpu: 500m
memory: 200Mi
  requests:
cpu: 100m
memory: 100Mi
  evaluationInterval: 60s
  externalLabels:
prometheus_from: arquitetura
  listenLocal: true
  logFormat: logfmt
  logLevel: info
  nodeSelector:
kubernetes.io/os: linux
  podMetadata:
labels:
labels:
  app: prometheus
  chart: prometheus-0.0.1
  release: cluster-monitoring
  podMonitorNamespaceSelector: {}
  podMonitorSelector:
matchLabels:
  app: camel-k
  replicas: 1
  resources:
limits:
  cpu: "1"
  memory: 1000Mi
requests:
  cpu: 750m
  memory: 750Mi
  retention: 12h
  ruleNamespaceSelector:
matchExpressions:
- key: field.cattle.io/projectId
  operator: In
  values:
  - p-gzj4v
- key: field.cattle.io/projectId
  operator: In
  values:
  - p-gzj4v
  ruleSelector:
matchExpressions:
- key: source
  operator: In
  values:
  - rancher-alert
  - rancher-monitoring
  rules:
alert: {}
  scrapeInterval: 60s
  secrets:
  - exporter-etcd-cert
 securityContext:
fsGroup: 2000
runAsNonRoot: true
runAsUser: 1000
  serviceAccountName: cluster-monitoring
  serviceMonitorNamespaceSelector:
matchExpressions:
- key: field.cattle.io/projectId
  operator: In
  values:
  - p-gzj4v
- key: field.cattle.io/projectId
  operator: In
  values:
  - p-gzj4v
  serviceMonitorSelector: {}
  tolerations:
  - effect: NoSchedule
key: cattle.io/os
   

Re: Apache Camel-k metrics in rancher embedded prometheus

2021-11-26 Thread Roberto Camelk
Thanks again Antonin.

You save my black-friday!

On Fri, Nov 26, 2021 at 11:02 AM Antonin Stefanutti
 wrote:
>
> Great!
>
> For the metrics, there should be the following registered by the MicroProfile 
> Metrics Camel extension:
>
> https://camel.apache.org/camel-quarkus/2.4.x/reference/extensions/microprofile-metrics.html#_usage
>
> However, the final name is determined by the MicroProfile Metrics 
> specification, so for example the following metric:
>
> camel.context.exchanges.completed.total
>
> Have its name translated to:
>
> application_camel_context_exchanges_completed_total
>
> To check also if the metrics endpoint do have the metrics registered, you can 
> run:
>
> $ kubectl exec deployment/ -- curl -s 
> http://localhost:8080/q/metrics | grep 
> application_camel_route_exchanges_completed_total
>
> # HELP application_camel_route_exchanges_completed_total The total number of 
> completed exchanges for a route or Camel Context
> # TYPE application_camel_route_exchanges_completed_total counter
> application_camel_route_exchanges_completed_total{camelContext="camel-1",routeId="route1"}
>  33.0
>
> > On 26 Nov 2021, at 14:34, Roberto Camelk  
> > wrote:
> >
> > Thanks a lot again Antonin. I owe you a beer or coffee!!!
> >
> > This worked 100%.
> >
> > To end, another question after this, prometheus start scraping the
> > metrics from my running route pod, but...
> >
> > Some metrics IDs are not there, some metrics starting with
> > "org_apache_camel_" as I have see in this grafana dashboard sample:
> > https://github.com/weimeilin79/camel-k-example-prometheus/blob/ca347f0b8b702b84b7129dfcfcb3b84eff4e2f73/grafana/SampleCamelDashboard.json#L145
> >
> > The other metrics (camel_k_* -
> > https://camel.apache.org/camel-k/next/observability/monitoring/operator.html#metrics)
> > are there as so the jvm metrics
> > (https://github.com/eclipse/microprofile-metrics/blob/master/spec/src/main/asciidoc/required-metrics.adoc#required-metrics).
> >
> > Is this correct? Why am I not getting that "org_apache_camel_" metrics?
> >
> > On Fri, Nov 26, 2021 at 9:13 AM Antonin Stefanutti
> >  wrote:
> >>
> >> It's likely that you need to configure the Prometheus instance, by editing 
> >> the Prometheus resource, e.g.:
> >>
> >> apiVersion: monitoring.coreos.com/v1
> >> kind: Prometheus
> >> metadata:
> >>  name: prometheus
> >> spec:
> >>  serviceAccountName: prometheus
> >>  podMonitorSelector:
> >>matchLabels:
> >>  app: camel-k
> >>  podMonitorNamespaceSelector: {}
> >>
> >> It's important to have podMonitorNamespaceSelector: {} to discover all the 
> >> namespaces, otherwise it's only the resource's namespace.
> >>
> >> Also you can use the Prometheus trait to set the labels on the Integration 
> >> PodMonitor accordingly, e.g.:
> >>
> >> $ kamel run -t prometheus.enabled=true -t 
> >> prometheus.pod-monitor-labels="app=camel-k"
> >>
> >> There are some examples in the Prometheus operator documentation:
> >>
> >> https://github.com/prometheus-operator/prometheus-operator/tree/v0.52.1/example/user-guides/getting-started
> >>
> >> And the troubleshooting guide at:
> >>
> >> https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/troubleshooting.md
> >>
> >>
> >>> On 26 Nov 2021, at 12:32, Roberto Camelk  
> >>> wrote:
> >>>
> >>> Antonin. Thanks !
> >>>
> >>> But I continue stuck, please let me share some extra info about my
> >>> prometheus operator log:
> >>>
> >>> level=debug ts=2021-11-26T11:12:05.837624346Z caller=operator.go:1840
> >>> component=prometheusoperator msg="filtering namespaces to select
> >>> PodMonitors from" namespaces=cattle-prometheus
> >>> namespace=cattle-prometheus prometheus=cluster-monitoring
> >>> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.837687534Z
> >>> caller=operator.go:1853 component=prometheusoperator msg="selected
> >>> PodMonitors" podmonitors= namespace=cattle-prometheus
> >>> prometheus=cluster-monitoring
> >>> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.942216811Z
> >>> caller=operator.go:1677 component=prometheusoperator msg="updating
> >>> Prometheus configuration secret skipped, no configuration change"
> >>> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.950980834Z
> >>> caller=operator.go:1776 component=prometheusoperator msg="filtering
> >>> namespaces to select ServiceMonitors from"
> >>> namespaces=cattle-prometheus,cattle-system,kube-node-lease,kube-public,security-scan,kube-system
> >>> namespace=cattle-prometheus prometheus=cluster-monitoring
> >>> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.951162973Z
> >>> caller=operator.go:1810 component=prometheusoperator msg="selected
> >>> ServiceMonitors"
> >>> 

Re: Apache Camel-k metrics in rancher embedded prometheus

2021-11-26 Thread Antonin Stefanutti
Great!

For the metrics, there should be the following registered by the MicroProfile 
Metrics Camel extension:

https://camel.apache.org/camel-quarkus/2.4.x/reference/extensions/microprofile-metrics.html#_usage

However, the final name is determined by the MicroProfile Metrics 
specification, so for example the following metric:

camel.context.exchanges.completed.total

Have its name translated to:

application_camel_context_exchanges_completed_total

To check also if the metrics endpoint do have the metrics registered, you can 
run:

$ kubectl exec deployment/ -- curl -s 
http://localhost:8080/q/metrics | grep 
application_camel_route_exchanges_completed_total

# HELP application_camel_route_exchanges_completed_total The total number of 
completed exchanges for a route or Camel Context
# TYPE application_camel_route_exchanges_completed_total counter
application_camel_route_exchanges_completed_total{camelContext="camel-1",routeId="route1"}
 33.0

> On 26 Nov 2021, at 14:34, Roberto Camelk  wrote:
> 
> Thanks a lot again Antonin. I owe you a beer or coffee!!!
> 
> This worked 100%.
> 
> To end, another question after this, prometheus start scraping the
> metrics from my running route pod, but...
> 
> Some metrics IDs are not there, some metrics starting with
> "org_apache_camel_" as I have see in this grafana dashboard sample:
> https://github.com/weimeilin79/camel-k-example-prometheus/blob/ca347f0b8b702b84b7129dfcfcb3b84eff4e2f73/grafana/SampleCamelDashboard.json#L145
> 
> The other metrics (camel_k_* -
> https://camel.apache.org/camel-k/next/observability/monitoring/operator.html#metrics)
> are there as so the jvm metrics
> (https://github.com/eclipse/microprofile-metrics/blob/master/spec/src/main/asciidoc/required-metrics.adoc#required-metrics).
> 
> Is this correct? Why am I not getting that "org_apache_camel_" metrics?
> 
> On Fri, Nov 26, 2021 at 9:13 AM Antonin Stefanutti
>  wrote:
>> 
>> It's likely that you need to configure the Prometheus instance, by editing 
>> the Prometheus resource, e.g.:
>> 
>> apiVersion: monitoring.coreos.com/v1
>> kind: Prometheus
>> metadata:
>>  name: prometheus
>> spec:
>>  serviceAccountName: prometheus
>>  podMonitorSelector:
>>matchLabels:
>>  app: camel-k
>>  podMonitorNamespaceSelector: {}
>> 
>> It's important to have podMonitorNamespaceSelector: {} to discover all the 
>> namespaces, otherwise it's only the resource's namespace.
>> 
>> Also you can use the Prometheus trait to set the labels on the Integration 
>> PodMonitor accordingly, e.g.:
>> 
>> $ kamel run -t prometheus.enabled=true -t 
>> prometheus.pod-monitor-labels="app=camel-k"
>> 
>> There are some examples in the Prometheus operator documentation:
>> 
>> https://github.com/prometheus-operator/prometheus-operator/tree/v0.52.1/example/user-guides/getting-started
>> 
>> And the troubleshooting guide at:
>> 
>> https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/troubleshooting.md
>> 
>> 
>>> On 26 Nov 2021, at 12:32, Roberto Camelk  
>>> wrote:
>>> 
>>> Antonin. Thanks !
>>> 
>>> But I continue stuck, please let me share some extra info about my
>>> prometheus operator log:
>>> 
>>> level=debug ts=2021-11-26T11:12:05.837624346Z caller=operator.go:1840
>>> component=prometheusoperator msg="filtering namespaces to select
>>> PodMonitors from" namespaces=cattle-prometheus
>>> namespace=cattle-prometheus prometheus=cluster-monitoring
>>> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.837687534Z
>>> caller=operator.go:1853 component=prometheusoperator msg="selected
>>> PodMonitors" podmonitors= namespace=cattle-prometheus
>>> prometheus=cluster-monitoring
>>> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.942216811Z
>>> caller=operator.go:1677 component=prometheusoperator msg="updating
>>> Prometheus configuration secret skipped, no configuration change"
>>> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.950980834Z
>>> caller=operator.go:1776 component=prometheusoperator msg="filtering
>>> namespaces to select ServiceMonitors from"
>>> namespaces=cattle-prometheus,cattle-system,kube-node-lease,kube-public,security-scan,kube-system
>>> namespace=cattle-prometheus prometheus=cluster-monitoring
>>> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.951162973Z
>>> caller=operator.go:1810 component=prometheusoperator msg="selected
>>> ServiceMonitors"
>>> 

Re: Apache Camel-k metrics in rancher embedded prometheus

2021-11-26 Thread Roberto Camelk
Thanks a lot again Antonin. I owe you a beer or coffee!!!

This worked 100%.

To end, another question after this, prometheus start scraping the
metrics from my running route pod, but...

Some metrics IDs are not there, some metrics starting with
"org_apache_camel_" as I have see in this grafana dashboard sample:
https://github.com/weimeilin79/camel-k-example-prometheus/blob/ca347f0b8b702b84b7129dfcfcb3b84eff4e2f73/grafana/SampleCamelDashboard.json#L145

The other metrics (camel_k_* -
https://camel.apache.org/camel-k/next/observability/monitoring/operator.html#metrics)
are there as so the jvm metrics
(https://github.com/eclipse/microprofile-metrics/blob/master/spec/src/main/asciidoc/required-metrics.adoc#required-metrics).

Is this correct? Why am I not getting that "org_apache_camel_" metrics?

On Fri, Nov 26, 2021 at 9:13 AM Antonin Stefanutti
 wrote:
>
> It's likely that you need to configure the Prometheus instance, by editing 
> the Prometheus resource, e.g.:
>
> apiVersion: monitoring.coreos.com/v1
> kind: Prometheus
> metadata:
>   name: prometheus
> spec:
>   serviceAccountName: prometheus
>   podMonitorSelector:
> matchLabels:
>   app: camel-k
>   podMonitorNamespaceSelector: {}
>
> It's important to have podMonitorNamespaceSelector: {} to discover all the 
> namespaces, otherwise it's only the resource's namespace.
>
> Also you can use the Prometheus trait to set the labels on the Integration 
> PodMonitor accordingly, e.g.:
>
> $ kamel run -t prometheus.enabled=true -t 
> prometheus.pod-monitor-labels="app=camel-k"
>
> There are some examples in the Prometheus operator documentation:
>
> https://github.com/prometheus-operator/prometheus-operator/tree/v0.52.1/example/user-guides/getting-started
>
> And the troubleshooting guide at:
>
> https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/troubleshooting.md
>
>
> > On 26 Nov 2021, at 12:32, Roberto Camelk  
> > wrote:
> >
> > Antonin. Thanks !
> >
> > But I continue stuck, please let me share some extra info about my
> > prometheus operator log:
> >
> > level=debug ts=2021-11-26T11:12:05.837624346Z caller=operator.go:1840
> > component=prometheusoperator msg="filtering namespaces to select
> > PodMonitors from" namespaces=cattle-prometheus
> > namespace=cattle-prometheus prometheus=cluster-monitoring
> > 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.837687534Z
> > caller=operator.go:1853 component=prometheusoperator msg="selected
> > PodMonitors" podmonitors= namespace=cattle-prometheus
> > prometheus=cluster-monitoring
> > 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.942216811Z
> > caller=operator.go:1677 component=prometheusoperator msg="updating
> > Prometheus configuration secret skipped, no configuration change"
> > 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.950980834Z
> > caller=operator.go:1776 component=prometheusoperator msg="filtering
> > namespaces to select ServiceMonitors from"
> > namespaces=cattle-prometheus,cattle-system,kube-node-lease,kube-public,security-scan,kube-system
> > namespace=cattle-prometheus prometheus=cluster-monitoring
> > 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.951162973Z
> > caller=operator.go:1810 component=prometheusoperator msg="selected
> > ServiceMonitors"
> > servicemonitors=cattle-prometheus/grafana-cluster-monitoring,cattle-prometheus/exporter-kube-etcd-cluster-monitoring,cattle-prometheus/exporter-node-cluster-monitoring,cattle-prometheus/exporter-kube-controller-manager-cluster-monitoring,cattle-prometheus/exporter-kube-state-cluster-monitoring,cattle-prometheus/prometheus-cluster-monitoring,cattle-prometheus/prometheus-operator-monitoring-operator,cattle-prometheus/exporter-fluentd-cluster-monitoring,cattle-prometheus/exporter-kubelets-cluster-monitoring,cattle-prometheus/exporter-kube-scheduler-cluster-monitoring,cattle-prometheus/exporter-kubernetes-cluster-monitoring
> > namespace=cattle-prometheus prometheus=cluster-monitoring
> > 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.977550133Z
> > caller=operator.go:1741 component=prometheusoperator msg="updated
> > tlsAssetsSecret" secretname=prometheus-cluster-monitoring-tls-assets
> > 26/11/2021 08:12:06 level=debug ts=2021-11-26T11:12:06.022196407Z
> > caller=operator.go:1169 component=prometheusoperator msg="new
> > statefulset generation inputs match current, skipping any actions"
> > 26/11/2021 08:12:26 level=debug ts=2021-11-26T11:12:26.321817491Z
> > caller=operator.go:734 component=prometheusoperator msg="PodMonitor
> > added"
> > 26/11/2021 08:12:27 level=debug ts=2021-11-26T11:12:27.755854021Z
> > caller=operator.go:748 component=prometheusoperator msg="PodMonitor
> > updated"
> > 26/11/2021 08:12:46 level=debug ts=2021-11-26T11:12:46.453112794Z
> > caller=operator.go:748 component=prometheusoperator msg="PodMonitor
> > updated"
> > 26/11/2021 08:17:35 level=debug ts=2021-11-26T11:17:35.194031009Z
> > caller=operator.go:759 

Re: Apache Camel-k metrics in rancher embedded prometheus

2021-11-26 Thread Antonin Stefanutti
It's likely that you need to configure the Prometheus instance, by editing the 
Prometheus resource, e.g.:

apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prometheus
spec:
  serviceAccountName: prometheus
  podMonitorSelector:
matchLabels:
  app: camel-k
  podMonitorNamespaceSelector: {}

It's important to have podMonitorNamespaceSelector: {} to discover all the 
namespaces, otherwise it's only the resource's namespace.

Also you can use the Prometheus trait to set the labels on the Integration 
PodMonitor accordingly, e.g.:

$ kamel run -t prometheus.enabled=true -t 
prometheus.pod-monitor-labels="app=camel-k"

There are some examples in the Prometheus operator documentation:

https://github.com/prometheus-operator/prometheus-operator/tree/v0.52.1/example/user-guides/getting-started

And the troubleshooting guide at:

https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/troubleshooting.md


> On 26 Nov 2021, at 12:32, Roberto Camelk  wrote:
> 
> Antonin. Thanks !
> 
> But I continue stuck, please let me share some extra info about my
> prometheus operator log:
> 
> level=debug ts=2021-11-26T11:12:05.837624346Z caller=operator.go:1840
> component=prometheusoperator msg="filtering namespaces to select
> PodMonitors from" namespaces=cattle-prometheus
> namespace=cattle-prometheus prometheus=cluster-monitoring
> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.837687534Z
> caller=operator.go:1853 component=prometheusoperator msg="selected
> PodMonitors" podmonitors= namespace=cattle-prometheus
> prometheus=cluster-monitoring
> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.942216811Z
> caller=operator.go:1677 component=prometheusoperator msg="updating
> Prometheus configuration secret skipped, no configuration change"
> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.950980834Z
> caller=operator.go:1776 component=prometheusoperator msg="filtering
> namespaces to select ServiceMonitors from"
> namespaces=cattle-prometheus,cattle-system,kube-node-lease,kube-public,security-scan,kube-system
> namespace=cattle-prometheus prometheus=cluster-monitoring
> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.951162973Z
> caller=operator.go:1810 component=prometheusoperator msg="selected
> ServiceMonitors"
> servicemonitors=cattle-prometheus/grafana-cluster-monitoring,cattle-prometheus/exporter-kube-etcd-cluster-monitoring,cattle-prometheus/exporter-node-cluster-monitoring,cattle-prometheus/exporter-kube-controller-manager-cluster-monitoring,cattle-prometheus/exporter-kube-state-cluster-monitoring,cattle-prometheus/prometheus-cluster-monitoring,cattle-prometheus/prometheus-operator-monitoring-operator,cattle-prometheus/exporter-fluentd-cluster-monitoring,cattle-prometheus/exporter-kubelets-cluster-monitoring,cattle-prometheus/exporter-kube-scheduler-cluster-monitoring,cattle-prometheus/exporter-kubernetes-cluster-monitoring
> namespace=cattle-prometheus prometheus=cluster-monitoring
> 26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.977550133Z
> caller=operator.go:1741 component=prometheusoperator msg="updated
> tlsAssetsSecret" secretname=prometheus-cluster-monitoring-tls-assets
> 26/11/2021 08:12:06 level=debug ts=2021-11-26T11:12:06.022196407Z
> caller=operator.go:1169 component=prometheusoperator msg="new
> statefulset generation inputs match current, skipping any actions"
> 26/11/2021 08:12:26 level=debug ts=2021-11-26T11:12:26.321817491Z
> caller=operator.go:734 component=prometheusoperator msg="PodMonitor
> added"
> 26/11/2021 08:12:27 level=debug ts=2021-11-26T11:12:27.755854021Z
> caller=operator.go:748 component=prometheusoperator msg="PodMonitor
> updated"
> 26/11/2021 08:12:46 level=debug ts=2021-11-26T11:12:46.453112794Z
> caller=operator.go:748 component=prometheusoperator msg="PodMonitor
> updated"
> 26/11/2021 08:17:35 level=debug ts=2021-11-26T11:17:35.194031009Z
> caller=operator.go:759 component=prometheusoperator msg="PodMonitor
> delete"
> 
> This last 4 lines is about my camel-k route, that I ran and stopped.
> 
> So, there are some problems, I think, about the logs above about the
> podmonitor selectors telling: "selected PodMonitors" podmonitors=
> namespace=cattle-prometheus prometheus=cluster-monitoring
> 
> My camel-k route is running at namespace "platform" and has no label
> like "prometheus=cluster-monitoring".
> 
> Do you know how can I fix this? Adding additional scrape configs to
> prometheus can solve this? Can you provide a snipet code?
> 
> On Thu, Nov 25, 2021 at 9:56 AM Antonin Stefanutti
>  wrote:
>> 
>> When run an Integration with `kamel run -t prometheus.enabled=true`, a 
>> PodMonitor resource is created for the Prometheus operator to reconcile and 
>> configure Prometheus to scrape the Integration metrics endpoint.
>> 
>> The PodMonitor metadata must match that of the Prometheus operator, like the 
>> namespace, the labels, ...
>> 
>> Some documentation is available at:
>> 
>> 

Re: Apache Camel-k metrics in rancher embedded prometheus

2021-11-26 Thread Roberto Camelk
Antonin. Thanks !

But I continue stuck, please let me share some extra info about my
prometheus operator log:

level=debug ts=2021-11-26T11:12:05.837624346Z caller=operator.go:1840
component=prometheusoperator msg="filtering namespaces to select
PodMonitors from" namespaces=cattle-prometheus
namespace=cattle-prometheus prometheus=cluster-monitoring
26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.837687534Z
caller=operator.go:1853 component=prometheusoperator msg="selected
PodMonitors" podmonitors= namespace=cattle-prometheus
prometheus=cluster-monitoring
26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.942216811Z
caller=operator.go:1677 component=prometheusoperator msg="updating
Prometheus configuration secret skipped, no configuration change"
26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.950980834Z
caller=operator.go:1776 component=prometheusoperator msg="filtering
namespaces to select ServiceMonitors from"
namespaces=cattle-prometheus,cattle-system,kube-node-lease,kube-public,security-scan,kube-system
namespace=cattle-prometheus prometheus=cluster-monitoring
26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.951162973Z
caller=operator.go:1810 component=prometheusoperator msg="selected
ServiceMonitors"
servicemonitors=cattle-prometheus/grafana-cluster-monitoring,cattle-prometheus/exporter-kube-etcd-cluster-monitoring,cattle-prometheus/exporter-node-cluster-monitoring,cattle-prometheus/exporter-kube-controller-manager-cluster-monitoring,cattle-prometheus/exporter-kube-state-cluster-monitoring,cattle-prometheus/prometheus-cluster-monitoring,cattle-prometheus/prometheus-operator-monitoring-operator,cattle-prometheus/exporter-fluentd-cluster-monitoring,cattle-prometheus/exporter-kubelets-cluster-monitoring,cattle-prometheus/exporter-kube-scheduler-cluster-monitoring,cattle-prometheus/exporter-kubernetes-cluster-monitoring
namespace=cattle-prometheus prometheus=cluster-monitoring
26/11/2021 08:12:05 level=debug ts=2021-11-26T11:12:05.977550133Z
caller=operator.go:1741 component=prometheusoperator msg="updated
tlsAssetsSecret" secretname=prometheus-cluster-monitoring-tls-assets
26/11/2021 08:12:06 level=debug ts=2021-11-26T11:12:06.022196407Z
caller=operator.go:1169 component=prometheusoperator msg="new
statefulset generation inputs match current, skipping any actions"
26/11/2021 08:12:26 level=debug ts=2021-11-26T11:12:26.321817491Z
caller=operator.go:734 component=prometheusoperator msg="PodMonitor
added"
26/11/2021 08:12:27 level=debug ts=2021-11-26T11:12:27.755854021Z
caller=operator.go:748 component=prometheusoperator msg="PodMonitor
updated"
26/11/2021 08:12:46 level=debug ts=2021-11-26T11:12:46.453112794Z
caller=operator.go:748 component=prometheusoperator msg="PodMonitor
updated"
26/11/2021 08:17:35 level=debug ts=2021-11-26T11:17:35.194031009Z
caller=operator.go:759 component=prometheusoperator msg="PodMonitor
delete"

This last 4 lines is about my camel-k route, that I ran and stopped.

So, there are some problems, I think, about the logs above about the
podmonitor selectors telling: "selected PodMonitors" podmonitors=
namespace=cattle-prometheus prometheus=cluster-monitoring

My camel-k route is running at namespace "platform" and has no label
like "prometheus=cluster-monitoring".

 Do you know how can I fix this? Adding additional scrape configs to
prometheus can solve this? Can you provide a snipet code?

On Thu, Nov 25, 2021 at 9:56 AM Antonin Stefanutti
 wrote:
>
> When run an Integration with `kamel run -t prometheus.enabled=true`, a 
> PodMonitor resource is created for the Prometheus operator to reconcile and 
> configure Prometheus to scrape the Integration metrics endpoint.
>
> The PodMonitor metadata must match that of the Prometheus operator, like the 
> namespace, the labels, ...
>
> Some documentation is available at:
>
> https://camel.apache.org/camel-k/1.7.x/observability/monitoring/integration.html#_discovery
>
> That contains some links to the Prometheus operator documentation for 
> troubleshooting why the metrics endpoint is not discovered.
>
> > On 25 Nov 2021, at 12:25, Roberto Camelk  
> > wrote:
> >
> > I have a Kubernetes running Rancher 2.4.3. I have the cluster
> > monitoring enabled in rancher, so that exists a Prometheus instance
> > running, so as a Prometheus Operator.
> >
> > Recently I deployed a Apache Camel-K operator, and now I want to
> > enable the prometheus integration for collect metrics about my camel
> > routes.
> >
> > So, my Camel-K operator is running in namescape camel-k and the
> > rancher embedded prometheus stack in cattle-prometheus namespace.
> >
> > I just have launched my route with the trait --trait
> > prometheus.enabled=true, but the camel metrics aren't listing at my
> > prometheus.
> >
> > Anyone knows why or what I need to configure to my camel-k route
> > deploy it's metrics at the rancher embedded prometheus?
>


Re: Apache Camel-k metrics in rancher embedded prometheus

2021-11-25 Thread Antonin Stefanutti
When run an Integration with `kamel run -t prometheus.enabled=true`, a 
PodMonitor resource is created for the Prometheus operator to reconcile and 
configure Prometheus to scrape the Integration metrics endpoint.

The PodMonitor metadata must match that of the Prometheus operator, like the 
namespace, the labels, ...

Some documentation is available at:

https://camel.apache.org/camel-k/1.7.x/observability/monitoring/integration.html#_discovery

That contains some links to the Prometheus operator documentation for 
troubleshooting why the metrics endpoint is not discovered.

> On 25 Nov 2021, at 12:25, Roberto Camelk  wrote:
> 
> I have a Kubernetes running Rancher 2.4.3. I have the cluster
> monitoring enabled in rancher, so that exists a Prometheus instance
> running, so as a Prometheus Operator.
> 
> Recently I deployed a Apache Camel-K operator, and now I want to
> enable the prometheus integration for collect metrics about my camel
> routes.
> 
> So, my Camel-K operator is running in namescape camel-k and the
> rancher embedded prometheus stack in cattle-prometheus namespace.
> 
> I just have launched my route with the trait --trait
> prometheus.enabled=true, but the camel metrics aren't listing at my
> prometheus.
> 
> Anyone knows why or what I need to configure to my camel-k route
> deploy it's metrics at the rancher embedded prometheus?



Re: Apache Camel single transaction with oracle aq and row inserts

2021-10-18 Thread Zheng Feng
OK, I see. It looks like that DataSourceTransactionManger could associate
the Connection with a thread scope. I'm not sure that the Oracle AQ and DB
can obtain the same connection from the pool. So can you try to set the
DataSource pool minPoolSize and maxPoolSize with "1" to see what happens?

On Sat, Oct 16, 2021 at 1:41 AM Mattern, Alex 
wrote:

> In this case the Oracle AQ and Oracle DB are actually the same resource.
> Oracle AQ's implementation of JMS is just an Oracle DB table behind the
> scenes. I can connect with one credential and select joining the AQ table
> and another table. So I don't believe that an external JTA
> TransactionManager is required since this is not a distributed transaction.
> This should be a single transaction on a single resource, namely Oracle DB.
> --
> Alex Mattern
>
> -Original Message-
> From: Zheng Feng 
> Sent: Friday, October 15, 2021 11:38 AM
> To: alex.matt...@bbh.com.invalid
> Cc: users@camel.apache.org
> Subject: [EXTERNAL SENDER:] Re: Apache Camel single transaction with
> oracle aq and row inserts
>
> It looks like you need an external JTA TransactionManager to coordinate
> these two resources ( oneis database and the other is Oracle AQ).
>
> On Fri, Oct 15, 2021 at 10:20 PM Mattern, Alex
> 
> wrote:
>
> > Any advice on having one Oracle connection reused for both insert and
> > jms within the same transaction? We have been attempting find the
> > solution to this problem since camel version 2.4.
> >
> > Alex Mattern
> >
> > -Original Message-
> > From: Mattern, Alex 
> > Sent: Tuesday, September 28, 2021 9:08 AM
> > To: users@camel.apache.org
> > Subject: [EXTERNAL SENDER:] Apache Camel single transaction with
> > oracle aq and row inserts
> >
> > I would like to have one transaction, one commit and one database
> > connection for an Apache Camel route that only uses Oracle. In my
> > current setup it appears that the Oracle AQ JMS transaction and the
> > Oracle INSERT transaction are separate.
> >
> > Why do I want it
> >
> > With separate transactions there is the possibility of duplicate
> > row INSERTs.
> > The current setup borrows two database connections from the pool.
> > One for JMS and one for INSERT. Every route uses twice the number of
> > database connections of which there are a limited supply.
> >
> > How do I know
> >
> > When the routes are running under load I can kill -9 the camel
> > process. The result is that the in-flight message rolls back, but the
> > INSERTed row remains.
> >
> > I have some apache camel routes that operate on the Oracle database.
> > The route starts from an Oracle AQ, inserts some rows into a few
> > database tables and finally sends the message to another Oracle AQ.
> >
> > Example Route java code
> >
> > from(getInputAQ())
> > .routeId("AQ_ROUTE")
> > .autoStartup(true)
> > .transacted("PROPAGATION_REQUIRED")
> > .process("OracleInsertProcessor")
> > .to(getOutputAQ())
> >
> > Example INSERT java code
> >
> > @Autowired
> > private JdbcTemplate jdbcTemplate;
> >
> > public int save(List list)
> > {
> > int[] insertCountArray =
> > getJdbcTemplate().batchUpdate(getInsertQuery(), new
> > BatchPreparedStatementSetter()
> > {
> > @Override
> > public void setValues(PreparedStatement ps, int i) throws
> > SQLException
> > {
> > buildInsertParameters(ps, list.get(i));
> > }
> >
> > @Override
> > public int getBatchSize()
> > {
> > return list.size();
> > }
> > });
> > return getTotalCount(insertCountArray); }
> >
> > Context file
> >
> > 
> >  class="org.springframework.jdbc.core.JdbcTemplate">
> >  
> >
> >  > factory-method="getPoolDataSource">
> > 
> > 
> > 
> >  > value="oracle.jdbc.pool.OracleDataSource" />
> > 
> > 
> > 
> > 
> > 
> >  > value="${inactiveConnectionTimeout}" />
> > 
> >  > value="${secondsToTrustIdleConnection}" />
> >  > value="${timeToLiveConnectionTimeout}" />
> >  
> >
> >  > class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
> > 
> >  
> >
> >  > class="org.apache.came

RE: Apache Camel single transaction with oracle aq and row inserts

2021-10-15 Thread Mattern, Alex
In this case the Oracle AQ and Oracle DB are actually the same resource. Oracle 
AQ's implementation of JMS is just an Oracle DB table behind the scenes. I can 
connect with one credential and select joining the AQ table and another table. 
So I don't believe that an external JTA TransactionManager is required since 
this is not a distributed transaction. This should be a single transaction on a 
single resource, namely Oracle DB. 
--
Alex Mattern 

-Original Message-
From: Zheng Feng  
Sent: Friday, October 15, 2021 11:38 AM
To: alex.matt...@bbh.com.invalid
Cc: users@camel.apache.org
Subject: [EXTERNAL SENDER:] Re: Apache Camel single transaction with oracle aq 
and row inserts

It looks like you need an external JTA TransactionManager to coordinate these 
two resources ( oneis database and the other is Oracle AQ).

On Fri, Oct 15, 2021 at 10:20 PM Mattern, Alex 
wrote:

> Any advice on having one Oracle connection reused for both insert and 
> jms within the same transaction? We have been attempting find the 
> solution to this problem since camel version 2.4.
>
> Alex Mattern
>
> -Original Message-
> From: Mattern, Alex 
> Sent: Tuesday, September 28, 2021 9:08 AM
> To: users@camel.apache.org
> Subject: [EXTERNAL SENDER:] Apache Camel single transaction with 
> oracle aq and row inserts
>
> I would like to have one transaction, one commit and one database 
> connection for an Apache Camel route that only uses Oracle. In my 
> current setup it appears that the Oracle AQ JMS transaction and the 
> Oracle INSERT transaction are separate.
>
> Why do I want it
>
> With separate transactions there is the possibility of duplicate 
> row INSERTs.
> The current setup borrows two database connections from the pool. 
> One for JMS and one for INSERT. Every route uses twice the number of 
> database connections of which there are a limited supply.
>
> How do I know
>
> When the routes are running under load I can kill -9 the camel 
> process. The result is that the in-flight message rolls back, but the 
> INSERTed row remains.
>
> I have some apache camel routes that operate on the Oracle database. 
> The route starts from an Oracle AQ, inserts some rows into a few 
> database tables and finally sends the message to another Oracle AQ.
>
> Example Route java code
>
> from(getInputAQ())
> .routeId("AQ_ROUTE")
> .autoStartup(true)
> .transacted("PROPAGATION_REQUIRED")
> .process("OracleInsertProcessor")
> .to(getOutputAQ())
>
> Example INSERT java code
>
> @Autowired
> private JdbcTemplate jdbcTemplate;
>
> public int save(List list)
> {
> int[] insertCountArray =
> getJdbcTemplate().batchUpdate(getInsertQuery(), new
> BatchPreparedStatementSetter()
> {
> @Override
> public void setValues(PreparedStatement ps, int i) throws 
> SQLException
> {
> buildInsertParameters(ps, list.get(i));
> }
>
> @Override
> public int getBatchSize()
> {
> return list.size();
> }
> });
> return getTotalCount(insertCountArray); }
>
> Context file
>
> 
> 
>  
>
>  factory-method="getPoolDataSource">
> 
> 
> 
>  value="oracle.jdbc.pool.OracleDataSource" />
> 
> 
> 
> 
> 
>  value="${inactiveConnectionTimeout}" />
> 
>  value="${secondsToTrustIdleConnection}" />
>  value="${timeToLiveConnectionTimeout}" />
>  
>
>  class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
> 
>  
>
>  class="org.apache.camel.spring.spi.SpringTransactionPolicy">
> 
>  /> 
>
>  class="org.apache.camel.spring.spi.SpringTransactionPolicy">
> 
>  value="PROPAGATION_REQUIRES_NEW" /> 
>
>  class="org.apache.camel.spring.spi.SpringTransactionPolicy">
> 
>  /> 
>
>  class="oracle.jms.AQjmsConnectionFactory">
>  
>
> 
> 
> 
>  
> 
>
> When thinking about solutions for this problem, it seems that reusing 
> the database connection used by the Apache Camel JMS component could 
> be a solution. I suppose there is a problem somewhere in my setup.
>
>
>
> --
> I have also posted this question to stackoverflow.
> https://urldefense.com/v3/__https://stackoverflow.com/questions/674931
> 88/apache-camel-single-transaction-with-oracle-aq-and-row-inserts__;!!
> KV6Wb-o!rHWrcae-klU9LhF2s3pTwkUkwHPpLsQoNMxKT7ZtRRL-zr45iWe2s584Iubrbh
> as$
> --
> Alex Mattern
>
>

Re: Apache Camel single transaction with oracle aq and row inserts

2021-10-15 Thread Zheng Feng
It looks like you need an external JTA TransactionManager to coordinate
these two resources ( oneis database and the other is Oracle AQ).

On Fri, Oct 15, 2021 at 10:20 PM Mattern, Alex 
wrote:

> Any advice on having one Oracle connection reused for both insert and jms
> within the same transaction? We have been attempting find the solution to
> this problem since camel version 2.4.
>
> Alex Mattern | AVP | Infomediary Architect | Investor Services
>
>  BROWN BROTHERS HARRIMAN
> 50 Post Office Square, Boston, MA 02110
> T 617-772-0096 | M 857-283-3724 | alex.matt...@bbh.com
> www.bbh.com
>
> -Original Message-
> From: Mattern, Alex 
> Sent: Tuesday, September 28, 2021 9:08 AM
> To: users@camel.apache.org
> Subject: [EXTERNAL SENDER:] Apache Camel single transaction with oracle aq
> and row inserts
>
> I would like to have one transaction, one commit and one database
> connection for an Apache Camel route that only uses Oracle. In my current
> setup it appears that the Oracle AQ JMS transaction and the Oracle INSERT
> transaction are separate.
>
> Why do I want it
>
> With separate transactions there is the possibility of duplicate row
> INSERTs.
> The current setup borrows two database connections from the pool. One
> for JMS and one for INSERT. Every route uses twice the number of database
> connections of which there are a limited supply.
>
> How do I know
>
> When the routes are running under load I can kill -9 the camel
> process. The result is that the in-flight message rolls back, but the
> INSERTed row remains.
>
> I have some apache camel routes that operate on the Oracle database. The
> route starts from an Oracle AQ, inserts some rows into a few database
> tables and finally sends the message to another Oracle AQ.
>
> Example Route java code
>
> from(getInputAQ())
> .routeId("AQ_ROUTE")
> .autoStartup(true)
> .transacted("PROPAGATION_REQUIRED")
> .process("OracleInsertProcessor")
> .to(getOutputAQ())
>
> Example INSERT java code
>
> @Autowired
> private JdbcTemplate jdbcTemplate;
>
> public int save(List list)
> {
> int[] insertCountArray =
> getJdbcTemplate().batchUpdate(getInsertQuery(), new
> BatchPreparedStatementSetter()
> {
> @Override
> public void setValues(PreparedStatement ps, int i) throws
> SQLException
> {
> buildInsertParameters(ps, list.get(i));
> }
>
> @Override
> public int getBatchSize()
> {
> return list.size();
> }
> });
> return getTotalCount(insertCountArray); }
>
> Context file
>
> 
> 
>  
>
>  factory-method="getPoolDataSource">
> 
> 
> 
>  value="oracle.jdbc.pool.OracleDataSource" />
> 
> 
> 
> 
> 
>  value="${inactiveConnectionTimeout}" />
> 
>  value="${secondsToTrustIdleConnection}" />
>  value="${timeToLiveConnectionTimeout}" />
>  
>
>  class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
> 
>  
>
>  class="org.apache.camel.spring.spi.SpringTransactionPolicy">
> 
>  /> 
>
>  class="org.apache.camel.spring.spi.SpringTransactionPolicy">
> 
>  value="PROPAGATION_REQUIRES_NEW" /> 
>
>  class="org.apache.camel.spring.spi.SpringTransactionPolicy">
> 
>  /> 
>
>  class="oracle.jms.AQjmsConnectionFactory">
>  
>
> 
> 
> 
> 
> 
>
> When thinking about solutions for this problem, it seems that reusing the
> database connection used by the Apache Camel JMS component could be a
> solution. I suppose there is a problem somewhere in my setup.
>
>
>
> --
> I have also posted this question to stackoverflow.
> https://urldefense.com/v3/__https://stackoverflow.com/questions/67493188/apache-camel-single-transaction-with-oracle-aq-and-row-inserts__;!!KV6Wb-o!rHWrcae-klU9LhF2s3pTwkUkwHPpLsQoNMxKT7ZtRRL-zr45iWe2s584Iubrbhas$
> --
> Alex Mattern
>
> *** IMPORTANT NOTE*
> The opinions expressed in this message and/or any attachments are those of
> the author and not necessarily those of Brown Brothers Harriman & Co., its
> subsidiaries and affiliates ("BBH"). There is no guarantee that this
> message is either private or confidential, and it may have been altered by
> unauthorized sources without your or our knowledge. Nothing in the message
> is capable or intended to create any legally binding obligations on either
> party and it is not intended to provide legal advice. BBH accepts no
> responsibility for loss or damage from its use, including damage from virus.
>
> **
>
>


RE: Apache Camel single transaction with oracle aq and row inserts

2021-10-15 Thread Mattern, Alex
Any advice on having one Oracle connection reused for both insert and jms 
within the same transaction? We have been attempting find the solution to this 
problem since camel version 2.4.

Alex Mattern | AVP | Infomediary Architect | Investor Services

 BROWN BROTHERS HARRIMAN
50 Post Office Square, Boston, MA 02110
T 617-772-0096 | M 857-283-3724 | alex.matt...@bbh.com
www.bbh.com

-Original Message-
From: Mattern, Alex  
Sent: Tuesday, September 28, 2021 9:08 AM
To: users@camel.apache.org
Subject: [EXTERNAL SENDER:] Apache Camel single transaction with oracle aq and 
row inserts

I would like to have one transaction, one commit and one database connection 
for an Apache Camel route that only uses Oracle. In my current setup it appears 
that the Oracle AQ JMS transaction and the Oracle INSERT transaction are 
separate.

Why do I want it

With separate transactions there is the possibility of duplicate row 
INSERTs.
The current setup borrows two database connections from the pool. One for 
JMS and one for INSERT. Every route uses twice the number of database 
connections of which there are a limited supply.

How do I know

When the routes are running under load I can kill -9 the camel process. The 
result is that the in-flight message rolls back, but the INSERTed row remains.

I have some apache camel routes that operate on the Oracle database. The route 
starts from an Oracle AQ, inserts some rows into a few database tables and 
finally sends the message to another Oracle AQ.

Example Route java code

from(getInputAQ())
.routeId("AQ_ROUTE")
.autoStartup(true)
.transacted("PROPAGATION_REQUIRED")
.process("OracleInsertProcessor")
.to(getOutputAQ())

Example INSERT java code

@Autowired
private JdbcTemplate jdbcTemplate;

public int save(List list)
{
int[] insertCountArray = getJdbcTemplate().batchUpdate(getInsertQuery(), 
new BatchPreparedStatementSetter()
{
@Override
public void setValues(PreparedStatement ps, int i) throws SQLException
{
buildInsertParameters(ps, list.get(i));
}

@Override
public int getBatchSize()
{
return list.size();
}
});
return getTotalCount(insertCountArray); }

Context file



 















 



 



 




 
  


 



 




 

When thinking about solutions for this problem, it seems that reusing the 
database connection used by the Apache Camel JMS component could be a solution. 
I suppose there is a problem somewhere in my setup.



--
I have also posted this question to stackoverflow. 
https://urldefense.com/v3/__https://stackoverflow.com/questions/67493188/apache-camel-single-transaction-with-oracle-aq-and-row-inserts__;!!KV6Wb-o!rHWrcae-klU9LhF2s3pTwkUkwHPpLsQoNMxKT7ZtRRL-zr45iWe2s584Iubrbhas$
--
Alex Mattern

*** IMPORTANT NOTE* The 
opinions expressed in this message and/or any attachments are those of the 
author and not necessarily those of Brown Brothers Harriman & Co., its 
subsidiaries and affiliates ("BBH"). There is no guarantee that this message is 
either private or confidential, and it may have been altered by unauthorized 
sources without your or our knowledge. Nothing in the message is capable or 
intended to create any legally binding obligations on either party and it is 
not intended to provide legal advice. BBH accepts no responsibility for loss or 
damage from its use, including damage from virus.
**


Re: Apache Camel Windows Service stuck in state Stopping (due to RabbitMQ Unknown consumerTag exception)

2021-01-29 Thread Michael Martinsen
I will try to collect a thread dump - and also try to let the Windows
Service just continue trying to stop to see what happens - off course
assuming I can reproduce this in my test environment :-/

Thanks so far.

/Michael

Venlig hilsen / Best Regards

Michael Martinsen



Openminds
Fredens Torv 1B, 1.
DK-8000 Aarhus C
Denmark
Cvr; 33647166
M: +45 6169 6779
E: m...@openminds.dk
www.openminds.dk





On Fri, Jan 29, 2021 at 9:56 AM Claus Ibsen  wrote:
>
> Hi
>
> When your app is stuck then you can take a thread dump, which can help
> pin point to which thread and where its stuck.
>
> Camel uses a separate thread to shutdown routes, while waiting for
> that to complete. And after a timeout then Camel will attempt to force
> shutdown.
> Don't you see any kind of shutdown logging about waiting for routes to
> finish and a timeout was hit or something?
>
> On Fri, Jan 29, 2021 at 9:11 AM Michael Martinsen  wrote:
> >
> > Hello Camel users
> >
> > I have a problem with some Apache Camel applications (Spring Boot) that are
> > consuming messages from RabbitMQ.
> > I am running these applications as Windows Services (using WinSW).
> >
> > Sometime when I deploy a new application to the Windows server running the
> > applications, the following exception is logged:
> >
> > 2021-01-28 19:57:24,554 WARN
> > org.apache.camel.component.rabbitmq.RabbitMQConsumer [Camel (camel-1)
> > thread #13 - ShutdownTask] Error occurred while stopping consumer. This
> > exception is ignored
> > java.io.IOException: Unknown consumerTag
> > at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:1476)
> > at
> > com.rabbitmq.client.impl.recovery.AutorecoveringChannel.basicCancel(AutorecoveringChannel.java:642)
> > at
> > org.apache.camel.component.rabbitmq.RabbitConsumer.doStop(RabbitConsumer.java:185)
> > at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:119)
> > at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:142)
> > at
> > org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:205)
> > at
> > org.apache.camel.component.rabbitmq.RabbitMQConsumer.closeConnectionAndChannel(RabbitMQConsumer.java:146)
> > at
> > org.apache.camel.component.rabbitmq.RabbitMQConsumer.doSuspend(RabbitMQConsumer.java:161)
> > at org.apache.camel.support.ServiceSupport.suspend(ServiceSupport.java:145)
> > at
> > org.apache.camel.util.ServiceHelper.suspendService(ServiceHelper.java:388)
> > at
> > org.apache.camel.impl.DefaultShutdownStrategy.suspendNow(DefaultShutdownStrategy.java:401)
> > at
> > org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run(DefaultShutdownStrategy.java:572)
> > at
> > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> > at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> > at
> > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> > at
> > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> > at java.base/java.lang.Thread.run(Thread.java:830)
> > 2021-01-28 19:57:24,981 INFO
> > org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask [Camel (camel-1)
> > thread #13 - ShutdownTask] Route: XXX complete, was consuming from:
> > rabbitmq://?declare=false=3=test.queue
> > 2021-01-28 19:57:24,981 INFO
> > org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask [Camel (camel-1)
> > thread #13 - ShutdownTask] Route: XXX shutdown complete, was consuming
> > from: seda://dlq
> > 2021-01-28 19:57:24,981 INFO
> > org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask [Camel (camel-1)
> > thread #13 - ShutdownTask] Route: XXX shutdown complete, was consuming
> > from: direct://YYY
> > 2021-01-28 19:57:24,981 INFO
> > org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask [Camel (camel-1)
> > thread #13 - ShutdownTask] Route: XXX shutdown complete, was consuming
> > from: file://YYY
> > 2021-01-28 19:57:24,981 INFO org.apache.camel.impl.DefaultShutdownStrategy
> > [RMI TCP Connection(2)-10.0.3.117] Graceful shutdown of 4 routes completed
> > in 0 seconds
> > 2021-01-28 19:57:24,996 INFO org.apache.camel.impl.DefaultCamelContext [RMI
> > TCP Connection(2)-10.0.3.117] Apache Camel 2.25.2 (CamelContext: camel-1)
> > uptime 7 days 17 hours
> > 2021-01-28 19:57:24,996 INFO org.apache.camel.impl.DefaultCamelContext [RMI
> > TCP Connection(2)-10.0.3.117] Apache Camel 2.25.2 (CamelContext: camel-1)
> > is shutdown in 0.442 seconds
> > 2021-01-28 19:57:25,076 INFO
> > org.springframework.scheduling.concurrent.ExecutorConfigurationSupport [RMI
> > TCP Connection(2)-10.0.3.117] Shutting down ExecutorService
> > 'applicationTaskExecutor'
> >
> > And that's it.
> > Although the exception is only a warning and it states that it's ignored,
> > nothing more happens.
> > The Windows Service does not stop and it's stuck in state "Stopping"..
> > Either the entire Windows server has to be restarted or some manual actions
> > have to be 

Re: Apache Camel Windows Service stuck in state Stopping (due to RabbitMQ Unknown consumerTag exception)

2021-01-29 Thread Claus Ibsen
Hi

When your app is stuck then you can take a thread dump, which can help
pin point to which thread and where its stuck.

Camel uses a separate thread to shutdown routes, while waiting for
that to complete. And after a timeout then Camel will attempt to force
shutdown.
Don't you see any kind of shutdown logging about waiting for routes to
finish and a timeout was hit or something?

On Fri, Jan 29, 2021 at 9:11 AM Michael Martinsen  wrote:
>
> Hello Camel users
>
> I have a problem with some Apache Camel applications (Spring Boot) that are
> consuming messages from RabbitMQ.
> I am running these applications as Windows Services (using WinSW).
>
> Sometime when I deploy a new application to the Windows server running the
> applications, the following exception is logged:
>
> 2021-01-28 19:57:24,554 WARN
> org.apache.camel.component.rabbitmq.RabbitMQConsumer [Camel (camel-1)
> thread #13 - ShutdownTask] Error occurred while stopping consumer. This
> exception is ignored
> java.io.IOException: Unknown consumerTag
> at com.rabbitmq.client.impl.ChannelN.basicCancel(ChannelN.java:1476)
> at
> com.rabbitmq.client.impl.recovery.AutorecoveringChannel.basicCancel(AutorecoveringChannel.java:642)
> at
> org.apache.camel.component.rabbitmq.RabbitConsumer.doStop(RabbitConsumer.java:185)
> at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:119)
> at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:142)
> at
> org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:205)
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.closeConnectionAndChannel(RabbitMQConsumer.java:146)
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.doSuspend(RabbitMQConsumer.java:161)
> at org.apache.camel.support.ServiceSupport.suspend(ServiceSupport.java:145)
> at
> org.apache.camel.util.ServiceHelper.suspendService(ServiceHelper.java:388)
> at
> org.apache.camel.impl.DefaultShutdownStrategy.suspendNow(DefaultShutdownStrategy.java:401)
> at
> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run(DefaultShutdownStrategy.java:572)
> at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:830)
> 2021-01-28 19:57:24,981 INFO
> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask [Camel (camel-1)
> thread #13 - ShutdownTask] Route: XXX complete, was consuming from:
> rabbitmq://?declare=false=3=test.queue
> 2021-01-28 19:57:24,981 INFO
> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask [Camel (camel-1)
> thread #13 - ShutdownTask] Route: XXX shutdown complete, was consuming
> from: seda://dlq
> 2021-01-28 19:57:24,981 INFO
> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask [Camel (camel-1)
> thread #13 - ShutdownTask] Route: XXX shutdown complete, was consuming
> from: direct://YYY
> 2021-01-28 19:57:24,981 INFO
> org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask [Camel (camel-1)
> thread #13 - ShutdownTask] Route: XXX shutdown complete, was consuming
> from: file://YYY
> 2021-01-28 19:57:24,981 INFO org.apache.camel.impl.DefaultShutdownStrategy
> [RMI TCP Connection(2)-10.0.3.117] Graceful shutdown of 4 routes completed
> in 0 seconds
> 2021-01-28 19:57:24,996 INFO org.apache.camel.impl.DefaultCamelContext [RMI
> TCP Connection(2)-10.0.3.117] Apache Camel 2.25.2 (CamelContext: camel-1)
> uptime 7 days 17 hours
> 2021-01-28 19:57:24,996 INFO org.apache.camel.impl.DefaultCamelContext [RMI
> TCP Connection(2)-10.0.3.117] Apache Camel 2.25.2 (CamelContext: camel-1)
> is shutdown in 0.442 seconds
> 2021-01-28 19:57:25,076 INFO
> org.springframework.scheduling.concurrent.ExecutorConfigurationSupport [RMI
> TCP Connection(2)-10.0.3.117] Shutting down ExecutorService
> 'applicationTaskExecutor'
>
> And that's it.
> Although the exception is only a warning and it states that it's ignored,
> nothing more happens.
> The Windows Service does not stop and it's stuck in state "Stopping"..
> Either the entire Windows server has to be restarted or some manual actions
> have to be taken to stop the Windows Service.
>
> So I am really not sure where to look for a problem - if this is in Apache
> Camel / Spring Boot / RabbitMQ / WinSW...
>
> I found this: https://github.com/spring-projects/spring-amqp/issues/1113
>
> But that relates to the Spring AMQP component which I am not using
> (directly). I am using the Spring Boot Camel RabbitMQ Starter.
>
> I noticed someone writing that this happens when the Camel app is stopped
> BEFORE it has read any messages from the RabbitMQ server.
> That's not what I am seeing - I have seen this in production environments
> several times where the Camel apps have been 

Re: Apache Camel Solr Component and Update queries

2021-01-22 Thread Zineb Bendhiba
Hello Jaime,

Can you give an example of the XML file, containing your object please ?

Best regards,

Zineb

Le ven. 22 janv. 2021 à 14:04, Penagos Jaime <
jaime.pena...@ub.uni-muenchen.de> a écrit :

> Hi everyone,
>
> I am using currently Apache Camel 2.24.3 and trying to integrate a system
> with a Solr index. On the Solr side we've been working with Unique IDs in
> form of a UUID, which will get updates during the whole workflow.
>
> I've been having trouble with the Camel Component, when trying to update
> those IDs. It seems that it's working, but on the Solr side it will add a
> new document, instead of updating the existing one.
>
> The used code looks like this:
>
> (Note: the filename will contain the UUID I want to update, the document
> has the Solr XML structure
>
> from("file:data?antInclude=*.xml")
> .log("[SOLR UPDATE]: ${header.CamelFileName} is being
> processed. ID: ${file:onlyname.noext}")
> .setHeader(SolrConstants.FIELD + "objID",
> simple("${file:onlyname.noext}"))
> .setHeader(Exchange.CONTENT_TYPE, constant("text/xml"))
> .setHeader(Exchange.FILE_CONTENT_TYPE,
> constant("text/xml"))
> .setHeader(SolrConstants.OPERATION,
> constant(SolrConstants.OPERATION_INSERT))
> .to("solr://" + solrURL)
> ;
>
>
> I have tried to delete the existing ID and then adding it again, but that
> case won't work as well...
>
> I appreciate your advice and help you can provide. Thank you very much!!
>
> Best regards
>
> --
> Jaime Penagos
>
>
>

-- 
Zineb


Re: Apache Camel returns NullPointerException when calling CXF Endpoint. This is failing after upgrading camel from 2.X to 3.0

2021-01-21 Thread Claus Ibsen
Hi

3.0 is EOL, use 3.7.0.

Also its not good practice to create endpoint instances manually via
new constructors, use for example endpoint-dsl.

On Thu, Jan 21, 2021 at 9:17 AM Padma Priya Kowlwar
 wrote:
>
> I have a CXFEndpoint as below
>
> CxfEndpoint cxfEndpoint =new CxfEndpoint();
> cxfEndpoint.setAddress("http://localhost:9201/mock;);
> cxfEndpoint.setDataFormat(DataFormat.CXF_MESSAGE);
> cxfEndpoint.setWsdlURL(serviceSoapOutboundWsdl);
> cxfEndpoint.setContinuationTimeout(continutionTimeout);
> cxfEndpoint.getOutFaultInterceptors().add(postOutFaultInterceptor);
> .
> .
>
> exchange.setProperty("cxfEndpoint", cxfEndpoint);
>
> I call this endpoint from my route builder as below
> .toD("${exchangeProperty.cxfEndpoint}")
>
> I am getting following exception
> Exception occured while sending outbound message to Receiver:::
> org.apache.camel.FailedToCreateProducerException: Failed to create Producer
> for endpoint: http://localhost:9201/mock. Reason:
> java.lang.NullPointerException
>
> at 
> org.apache.camel.impl.engine.DefaultProducerCache.acquireProducer(DefaultProducerCache.java:139)
> at 
> org.apache.camel.impl.engine.DefaultProducerCache.doInAsyncProducer(DefaultProducerCache.java:264)
> at 
> org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:151)
> at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:228)
> at 
> org.apache.camel.processor.TryProcessor$TryState.run(TryProcessor.java:95)
> at 
> org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:185)
> at 
> org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:59)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:87)
> at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:228)
> at 
> org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.asyncInvoke(CxfConsumer.java:182)
> at 
> org.apache.camel.component.cxf.CxfConsumer$CxfConsumerInvoker.invoke(CxfConsumer.java:158)
> at 
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
> at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at 
> org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)
> at 
> org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
> at 
> org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)
> at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> at 
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at 
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
> at 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:247)
> at 
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:79)
> at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190)
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:500)
> at 
> org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> at 
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> at java.base/java.lang.Thread.run(Thread.java:834)
>
>
>
> Caused by: 

Re: Apache Camel EOL Versions

2020-12-15 Thread Claus Ibsen
On Tue, Dec 15, 2020 at 5:40 PM Ajmera, Hemang C  wrote:
>
>
> Hi
>My understanding was that LTS version will be supported for 1 year. So 
> even if 3.7 is release version 3.4 will be continued to be supported for bugs 
> and security fixes. Did I misunderstood something?
>

Yes each LTS has 1 year of support. And about 2 LTS releases per year.


> This is the reference 
> https://camel.apache.org/blog/2020/03/LTS-Release-Schedule/
>
>
> Thanks and Regards,
> Hemang Ajmera
>
>
> -Original Message-
> From: Zoran Regvart 
> Sent: 15 December 2020 21:42
> To: Symphoni Bush - NOAA Affiliate 
> Cc: users@camel.apache.org
> Subject: Re: Apache Camel EOL Versions
>
>
> EXTERNAL SENDER:   Do not click any links or open any attachments unless you 
> trust the sender and know the content is safe.
> EXPÉDITEUR EXTERNE:Ne cliquez sur aucun lien et n’ouvrez aucune pièce 
> jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous ayez 
> l'assurance que le contenu provient d'une source sûre.
>
> Hi Symphoni,
> I wonder where you found the owner mail alias? Moving the conversation to the 
> users mailing list.
>
> I'll try to answer to the best of my abilities, others may correct me.
>
> Answer differs slightly based on the major version (2.x or 3.x). For 2.x we 
> supported the latest two releases. Since version 3.x we support the latest 
> and last two LTS versions. Exception to that is when we released 3.0 we opted 
> to support the latest 2.x release as well. All other versions should be 
> considered EOL at the release of a newer version. This is with respect to 
> what we're willing to do here at ASF.
> Organizations providing commercial support for Camel would most likely have 
> their own definition of support and EOL dates.
>
> So the date a version is considered EOL is:
>
> 1/ for 2.x releases: when a new minor release was done, the second oldest 
> minor release was considered EOL, for example 2.25.0 was released on 
> 2020-01-23, making 2.23.x EOL from that date.
>
> 2/ for non-LTS 3.x: we consider non-LTS releases EOL as soon as a newer 
> non-LTS is released, for example 3.6.0 was released on
> 2020-09-20 making 3.5.0 EOL on that date.
>
> 3/ for LTS 3.x: we support the last two LTS releases (currently 3.4 and soon 
> 3.7), 3.4 will be EOL with the the LTS release done after 3.7
>
> List of versions and release dates is available in the release archive on the 
> website here:
>
> https://urldefense.com/v3/__https://camel.apache.org/releases/__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ91E7908T$
>
> It goes back only to 2.18 as that's where we stopped migrating old data to 
> the new website. For older dates you need to either go to the mailing list 
> archives or to the wiki[1] which was the source for the old website.
>
> You can find further information in the LTS schedule for 2020 blog post:
>
> https://urldefense.com/v3/__https://camel.apache.org/blog/2020/03/LTS-Release-Schedule/__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ94ppx4Js$
>
> zoran
>
> [1] 
> https://urldefense.com/v3/__https://cwiki.apache.org/confluence/display/CAMEL/Download__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ97YrWBkI$
>
> On Tue, Dec 15, 2020 at 4:25 PM Symphoni Bush - NOAA Affiliate 
>  wrote:
> >
> > Good morning,
> >
> > I am trying to figure out what versions of Apache Camel are EOL and if so, 
> > what dates these versions became EOL. If there is somewhere this 
> > information is stored, please let me know.
> >
> > Thanks
>
>
>
> --
> Zoran Regvart



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


R: RE: Apache Camel EOL Versions

2020-12-15 Thread Andrea Cosentino
3.4.x will be supported as lts for one year from the release date of 3.4.0

Inviato da Yahoo Mail su Android 
 
  Il mar, 15 dic, 2020 alle 17:40, Ajmera, Hemang C ha 
scritto:   
Hi
  My understanding was that LTS version will be supported for 1 year. So even 
if 3.7 is release version 3.4 will be continued to be supported for bugs and 
security fixes. Did I misunderstood something?

This is the reference 
https://camel.apache.org/blog/2020/03/LTS-Release-Schedule/


Thanks and Regards,
Hemang Ajmera


-Original Message-
From: Zoran Regvart  
Sent: 15 December 2020 21:42
To: Symphoni Bush - NOAA Affiliate 
Cc: users@camel.apache.org
Subject: Re: Apache Camel EOL Versions


EXTERNAL SENDER:  Do not click any links or open any attachments unless you 
trust the sender and know the content is safe.
EXPÉDITEUR EXTERNE:    Ne cliquez sur aucun lien et n’ouvrez aucune pièce 
jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous ayez 
l'assurance que le contenu provient d'une source sûre.

Hi Symphoni,
I wonder where you found the owner mail alias? Moving the conversation to the 
users mailing list.

I'll try to answer to the best of my abilities, others may correct me.

Answer differs slightly based on the major version (2.x or 3.x). For 2.x we 
supported the latest two releases. Since version 3.x we support the latest and 
last two LTS versions. Exception to that is when we released 3.0 we opted to 
support the latest 2.x release as well. All other versions should be considered 
EOL at the release of a newer version. This is with respect to what we're 
willing to do here at ASF.
Organizations providing commercial support for Camel would most likely have 
their own definition of support and EOL dates.

So the date a version is considered EOL is:

1/ for 2.x releases: when a new minor release was done, the second oldest minor 
release was considered EOL, for example 2.25.0 was released on 2020-01-23, 
making 2.23.x EOL from that date.

2/ for non-LTS 3.x: we consider non-LTS releases EOL as soon as a newer non-LTS 
is released, for example 3.6.0 was released on
2020-09-20 making 3.5.0 EOL on that date.

3/ for LTS 3.x: we support the last two LTS releases (currently 3.4 and soon 
3.7), 3.4 will be EOL with the the LTS release done after 3.7

List of versions and release dates is available in the release archive on the 
website here:

https://urldefense.com/v3/__https://camel.apache.org/releases/__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ91E7908T$
 

It goes back only to 2.18 as that's where we stopped migrating old data to the 
new website. For older dates you need to either go to the mailing list archives 
or to the wiki[1] which was the source for the old website.

You can find further information in the LTS schedule for 2020 blog post:

https://urldefense.com/v3/__https://camel.apache.org/blog/2020/03/LTS-Release-Schedule/__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ94ppx4Js$
 

zoran

[1] 
https://urldefense.com/v3/__https://cwiki.apache.org/confluence/display/CAMEL/Download__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ97YrWBkI$
 

On Tue, Dec 15, 2020 at 4:25 PM Symphoni Bush - NOAA Affiliate 
 wrote:
>
> Good morning,
>
> I am trying to figure out what versions of Apache Camel are EOL and if so, 
> what dates these versions became EOL. If there is somewhere this information 
> is stored, please let me know.
>
> Thanks



--
Zoran Regvart
  


RE: Apache Camel EOL Versions

2020-12-15 Thread Ajmera, Hemang C

Hi
   My understanding was that LTS version will be supported for 1 year. So even 
if 3.7 is release version 3.4 will be continued to be supported for bugs and 
security fixes. Did I misunderstood something?

This is the reference 
https://camel.apache.org/blog/2020/03/LTS-Release-Schedule/


Thanks and Regards,
Hemang Ajmera


-Original Message-
From: Zoran Regvart  
Sent: 15 December 2020 21:42
To: Symphoni Bush - NOAA Affiliate 
Cc: users@camel.apache.org
Subject: Re: Apache Camel EOL Versions


EXTERNAL SENDER:   Do not click any links or open any attachments unless you 
trust the sender and know the content is safe.
EXPÉDITEUR EXTERNE:Ne cliquez sur aucun lien et n’ouvrez aucune pièce 
jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous ayez 
l'assurance que le contenu provient d'une source sûre.

Hi Symphoni,
I wonder where you found the owner mail alias? Moving the conversation to the 
users mailing list.

I'll try to answer to the best of my abilities, others may correct me.

Answer differs slightly based on the major version (2.x or 3.x). For 2.x we 
supported the latest two releases. Since version 3.x we support the latest and 
last two LTS versions. Exception to that is when we released 3.0 we opted to 
support the latest 2.x release as well. All other versions should be considered 
EOL at the release of a newer version. This is with respect to what we're 
willing to do here at ASF.
Organizations providing commercial support for Camel would most likely have 
their own definition of support and EOL dates.

So the date a version is considered EOL is:

1/ for 2.x releases: when a new minor release was done, the second oldest minor 
release was considered EOL, for example 2.25.0 was released on 2020-01-23, 
making 2.23.x EOL from that date.

2/ for non-LTS 3.x: we consider non-LTS releases EOL as soon as a newer non-LTS 
is released, for example 3.6.0 was released on
2020-09-20 making 3.5.0 EOL on that date.

3/ for LTS 3.x: we support the last two LTS releases (currently 3.4 and soon 
3.7), 3.4 will be EOL with the the LTS release done after 3.7

List of versions and release dates is available in the release archive on the 
website here:

https://urldefense.com/v3/__https://camel.apache.org/releases/__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ91E7908T$
 

It goes back only to 2.18 as that's where we stopped migrating old data to the 
new website. For older dates you need to either go to the mailing list archives 
or to the wiki[1] which was the source for the old website.

You can find further information in the LTS schedule for 2020 blog post:

https://urldefense.com/v3/__https://camel.apache.org/blog/2020/03/LTS-Release-Schedule/__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ94ppx4Js$
 

zoran

[1] 
https://urldefense.com/v3/__https://cwiki.apache.org/confluence/display/CAMEL/Download__;!!AaIhyw!8JFXRBAgcpSfw70r1k6EnsebuUKzZTTL_40k3z4yUhPywv-HIeEhZcvJ97YrWBkI$
 

On Tue, Dec 15, 2020 at 4:25 PM Symphoni Bush - NOAA Affiliate 
 wrote:
>
> Good morning,
>
> I am trying to figure out what versions of Apache Camel are EOL and if so, 
> what dates these versions became EOL. If there is somewhere this information 
> is stored, please let me know.
>
> Thanks



--
Zoran Regvart


Re: Apache Camel EOL Versions

2020-12-15 Thread Claus Ibsen
Hi

For Camel 2.x at this moment then Camel 2.25.x is the only supported
release. We only do patch releases, and there are no new minor
releases (eg 2.26) planned. Camel 2.x is very likely to be EOL by the
end of 2021, and we mainly only at this time put effort into security
fixes. The 2.x is not active developed anymore.

For Camel 3 then we only support LTS releases by patch releases, where
an LTS release is supported for 1 year.
The non-LTS releases are released as-is without any patch release expected.

And to clairy then "support" here means that we will accept code
changes and backport and do patch releases.

As always anyone using any release of Camel can get help and support
in the community.
For example if you use Camel 3.6.0 and has a problem, then the
community can help support you. But if we find a bug in 3.6.0,
then as its a non LTS release then its not fixed in that release, but
as always in the master branch and on the LTS branches (if possible).




On Tue, Dec 15, 2020 at 5:12 PM Zoran Regvart  wrote:
>
> Hi Symphoni,
> I wonder where you found the owner mail alias? Moving the conversation
> to the users mailing list.
>
> I'll try to answer to the best of my abilities, others may correct me.
>
> Answer differs slightly based on the major version (2.x or 3.x). For
> 2.x we supported the latest two releases. Since version 3.x we support
> the latest and last two LTS versions. Exception to that is when we
> released 3.0 we opted to support the latest 2.x release as well. All
> other versions should be considered EOL at the release of a newer
> version. This is with respect to what we're willing to do here at ASF.
> Organizations providing commercial support for Camel would most likely
> have their own definition of support and EOL dates.
>
> So the date a version is considered EOL is:
>
> 1/ for 2.x releases: when a new minor release was done, the second
> oldest minor release was considered EOL, for example 2.25.0 was
> released on 2020-01-23, making 2.23.x EOL from that date.
>
> 2/ for non-LTS 3.x: we consider non-LTS releases EOL as soon as a
> newer non-LTS is released, for example 3.6.0 was released on
> 2020-09-20 making 3.5.0 EOL on that date.
>
> 3/ for LTS 3.x: we support the last two LTS releases (currently 3.4
> and soon 3.7), 3.4 will be EOL with the the LTS release done after 3.7
>
> List of versions and release dates is available in the release archive
> on the website here:
>
> https://camel.apache.org/releases/
>
> It goes back only to 2.18 as that's where we stopped migrating old
> data to the new website. For older dates you need to either go to the
> mailing list archives or to the wiki[1] which was the source for the
> old website.
>
> You can find further information in the LTS schedule for 2020 blog post:
>
> https://camel.apache.org/blog/2020/03/LTS-Release-Schedule/
>
> zoran
>
> [1] https://cwiki.apache.org/confluence/display/CAMEL/Download
>
> On Tue, Dec 15, 2020 at 4:25 PM Symphoni Bush - NOAA Affiliate
>  wrote:
> >
> > Good morning,
> >
> > I am trying to figure out what versions of Apache Camel are EOL and if so, 
> > what dates these versions became EOL. If there is somewhere this 
> > information is stored, please let me know.
> >
> > Thanks
>
>
>
> --
> Zoran Regvart



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


Re: Apache Camel EOL Versions

2020-12-15 Thread Zoran Regvart
Hi Symphoni,
I wonder where you found the owner mail alias? Moving the conversation
to the users mailing list.

I'll try to answer to the best of my abilities, others may correct me.

Answer differs slightly based on the major version (2.x or 3.x). For
2.x we supported the latest two releases. Since version 3.x we support
the latest and last two LTS versions. Exception to that is when we
released 3.0 we opted to support the latest 2.x release as well. All
other versions should be considered EOL at the release of a newer
version. This is with respect to what we're willing to do here at ASF.
Organizations providing commercial support for Camel would most likely
have their own definition of support and EOL dates.

So the date a version is considered EOL is:

1/ for 2.x releases: when a new minor release was done, the second
oldest minor release was considered EOL, for example 2.25.0 was
released on 2020-01-23, making 2.23.x EOL from that date.

2/ for non-LTS 3.x: we consider non-LTS releases EOL as soon as a
newer non-LTS is released, for example 3.6.0 was released on
2020-09-20 making 3.5.0 EOL on that date.

3/ for LTS 3.x: we support the last two LTS releases (currently 3.4
and soon 3.7), 3.4 will be EOL with the the LTS release done after 3.7

List of versions and release dates is available in the release archive
on the website here:

https://camel.apache.org/releases/

It goes back only to 2.18 as that's where we stopped migrating old
data to the new website. For older dates you need to either go to the
mailing list archives or to the wiki[1] which was the source for the
old website.

You can find further information in the LTS schedule for 2020 blog post:

https://camel.apache.org/blog/2020/03/LTS-Release-Schedule/

zoran

[1] https://cwiki.apache.org/confluence/display/CAMEL/Download

On Tue, Dec 15, 2020 at 4:25 PM Symphoni Bush - NOAA Affiliate
 wrote:
>
> Good morning,
>
> I am trying to figure out what versions of Apache Camel are EOL and if so, 
> what dates these versions became EOL. If there is somewhere this information 
> is stored, please let me know.
>
> Thanks



-- 
Zoran Regvart


Re: Apache Camel 3.X migration - ClassNotFoundException: org.apache.camel.impl.BreakpointSupport

2020-11-09 Thread Claus Ibsen
Hi

Smell like you have mixed versions of Camel on the classpath. Make
sure to use the same version such as 3.4.4

On Mon, Nov 9, 2020 at 1:11 AM Deepak Reddy Ekkati
 wrote:
>
> Hello There,
>
> When Migrating app from 2.X to 3.X, Build is successful but the tests fail
> with ClassNotFoundException: org.apache.camel.impl.BreakpointSupport.
>
> java.lang.NoClassDefFoundError: org/apache/camel/impl/BreakpointSupport
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.getDeclaredClasses0(Native Method)
> at java.lang.Class.getDeclaredClasses(Class.java:1867)
> at java.lang.Class$2.run(Class.java:1504)
> at java.lang.Class$2.run(Class.java:1499)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.lang.Class.getClasses(Class.java:1498)
> at org.testng.internal.ClassInfoMap.registerClass(ClassInfoMap.java:43)
> at org.testng.internal.ClassInfoMap.(ClassInfoMap.java:29)
> at org.testng.internal.ClassInfoMap.(ClassInfoMap.java:21)
> at org.testng.TestRunner.initMethods(TestRunner.java:369)
> at org.testng.TestRunner.init(TestRunner.java:271)
> at org.testng.TestRunner.init(TestRunner.java:241)
> at org.testng.TestRunner.(TestRunner.java:167)
> at 
> org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:663)
> at org.testng.SuiteRunner.init(SuiteRunner.java:260)
> at org.testng.SuiteRunner.(SuiteRunner.java:198)
> at org.testng.TestNG.createSuiteRunner(TestNG.java:1295)
> at org.testng.TestNG.createSuiteRunners(TestNG.java:1273)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1128)
> at org.testng.TestNG.runSuites(TestNG.java:1049)
> at org.testng.TestNG.run(TestNG.java:1017)
> at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
> at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.camel.impl.BreakpointSupport
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 35 more
>
> pom.xml
> ${camel.version} --> 3.5.0 (tried with 3.6.0 as well)
> ${testng.version} --> 6.14.3
> 
> org.apache.camel
> camel-spring
> ${camel.version}
> 
>   
> org.springframework
> spring-aop
>   
> 
>   
>   
> org.apache.camel
> camel-support
> ${camel.version}
>   
>   
> org.apache.camel
> camel-base
> ${camel.version}
>   
>   
> org.apache.camel
> camel-core
> ${camel.version}
>   
>   
> org.testng
> testng
> ${testng.version}
> test
>   
>
> Class: BreakpointSupport is not used on my App, it's mostly a reference
> from one of the camel modules, and in the latest version of camel,
> BreakpointSupport is moved to org.apache.camel.processor.interceptor but
> it's still trying to fetch from the old location.
>
>
> I am struck, It would be great if someone can help me with this issue.
>
> Thanks in Advance!!
>
>
> Thanks,
>
> Deepak



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


Re: Apache Camel User Stories Page

2020-11-06 Thread ski n
Hi Alexandre,

Looks interesting, would be nice if the website would also be in English
(Though with Google translate it get an idea
https://translate.google.com/translate?sl=auto=en=https://www.apipass.com.br)
also helps. Can you tell a little more about the technical setup
(backend/frontend), runtime (Karaf, Wildfly, Spring boot) and the
architecture?

Raymond

Op vr 6 nov. 2020 om 09:04 schreef Alexandre Davi Zanelatto <
alexan...@apipass.com.br>:

> Hi
>
> We are a brazilian startup developing an IPaaS(Integration Platform as a
> Service) and we are using Apache Camel to help us to develop our platform,
> nowdays we have abaout 20 customers and 15 employees.
>
> I would like to add our case to the Apache Camel user stories page. Our
> website is https://www.apipass.com.br and a brief description of our use
> of Apache Camel: IPaaS(Integration Platform as a Service) built on top of
> Apache Camel, making integrations easy with an low code integration
> plataform.
>
>
>
>
>
>


Re: Apache Camel Fuse soap proxy service CXF input type

2020-10-05 Thread Peter Turányi

 
I found that null input is caused by log activity in route. When I have removed 
log Transfomer bean get input message without problem.
Now I have to parse input message.
__
> Od: "Peter Turányi" 
> Komu: users@camel.apache.org
> Dátum: 30.09.2020 14:13
> Predmet: Apache Camel Fuse soap proxy service CXF input type
>
I use Red Hat Fuse CodeReady Studio 12.16.0.GA. I have created soap
proxy service using CXF.
I have defined start of route
uri="cxf:bean:countryInfoProxyServiceClient?dataFormat=RAW"/>
because PAYLOAD and CXF-MESSAGE data formats cause exception Message
part {http://www.demo.com/countryinfo 
}VsetkyInformacieKrajiny was not
recognized. (Does it exist in service WSDL?)

I have tried get values from input body to create input for service as
POJO (because service has data format POJO and converting output was
very easy using java).
method="getVsetkyInformacieKrajiny2FullCountryInfo"/>
@Bean
  public FullCountryInfo
getVsetkyInformacieKrajiny2FullCountryInfo(@Body VsetkyInformacieKrajiny
proxyRequest) {
  FullCountryInfo request = new FullCountryInfo();
  request.setSCountryISOCode(proxyRequest.getKodKrajiny());
  return request; }
But I get exception
Caused by: org.apache.camel.InvalidPayloadException: No body available
of type: com.demo.countryinfo.VsetkyInformacieKrajiny but has value:
org.apache.cxf.transport.http.AbstractHTTPDestination$1@381d44a1 of
type: null on: Message[]. Caused by: Error during type conversion from
type: null to the required type:
com.demo.countryinfo.VsetkyInformacieKrajiny with value
org.apache.cxf.transport.http.AbstractHTTPDestination$1@381d44a1 due
null.

I found example where input is treated as org.w3c.dom.Document
method="getDocument2FullCountryInfo"/>
@Bean public FullCountryInfo getDocument2FullCountryInfo(@Body Document
doc) {
  Node node = doc.getElementsByTagName("Kod_Krajiny").item(0);
  FullCountryInfo request = new FullCountryInfo();
  request.setSCountryISOCode(node.getTextContent());
  return request; }
but then I get similar exception
Caused by: org.apache.camel.InvalidPayloadException: No body available
of type: org.w3c.dom.Document but has value:
org.apache.cxf.transport.http.AbstractHTTPDestination$1@343ffe61 of
type: null on: Message[].
Caused by: Error during type conversion from type: java.lang.String to
the required type: org.w3c.dom.Document with value [Body is instance of
java.io.InputStream] due org.xml.sax.SAXParseException; lineNumber: 1;
columnNumber: 1; Premature end of file..

What type is input in camel context route in this case and how to parse
it?



Re: Apache camel running on multiple nodes

2020-09-30 Thread Andrea Cosentino
I believe you already have an answer on this.

Il giorno gio 1 ott 2020 alle ore 07:50 SRAVAN KUMAR <
pabbasrava...@gmail.com> ha scritto:

> Hi Team,
>
>  I want to run the apache camel file route on multiple nodes and the source
> folder is the same for both nodes and expecting the route to process files
> parallelly
>
> > when I tried the running camel on multiple nodes, files are processing in
> a round-robin fashion (only one ode processing is at a time)
> > Example:- if Node1 pick  file1  then Node2 is waiting for node1 to
> process
> > after node1 processing completes, node2 will pick a new file (Node1 will
> wait for node2 to process file)
>
>
> MY FILE ROUTE :
> from("file:\\\folder?maxMessagesPerPoll=1=true&
> readLockMinLength=0=changed=1000
> eadLockCheckInterval=1000)
>


RE: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Mrinal Sharma
No, it's not wrong. The Keystore works with the same password if I remove Camel 
dependency. With camel added, it gives the error. Some more Information from 
Java Security Logs. Not sure why in non-working logs code picks bouncycastle.

Non-working logs:
Provider: KeyStore.JKS type from: SUN
Provider: MessageDigest.SHA algorithm from: SUN
pkcs12: Loading PKCS#7 data
pkcs12: Loading PKCS#7 encryptedData (PBEWithSHA1AndRC2_40 iterations: 5)
jar: beginEntry 
org/bouncycastle/jcajce/provider/symmetric/RC2$PBEWithSHAAnd40BitRC2.class
jar: Manifest Entry: 
org/bouncycastle/jcajce/provider/symmetric/RC2$PBEWithSHAAnd40BitRC2.class 
digest=SHA-256
jar:   manifest 
3654e2acabc5ecdfbc8e5c1b37356975ead6804bd65560e61e190999cc14fbf28
jar:   computed 
3654e2acabc5ecdfbc8e51cb37356975ead6804bd65560e61e190999cc14fbf28
jar:
jar: beginEntry 
org/bouncycastle/jcajce/provider/symmetric/util/BaseBlockCipher.class
jar: Manifest Entry:


Working Logs:
Provider: KeyStore.JKS type from: SUN
Provider: MessageDigest.SHA algorithm from: SUN
pkcs12: Loading PKCS#7 data
ProviderConfig: Loading provider: com.sun.crypto.provider.SunJCE
policy: getPermissions:
PD CodeSource: 
(file:/C:/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/sunjce_provider.jar 
)
PD ClassLoader: sun.misc.Launcher$ExtClassLoader@3c4c4927
PD Principals: 
policy: evaluate codesources:
Policy CodeSource: 
(file:/C:/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/* )
Active CodeSource: (file:/C: 
/AdoptOpenJDK/jdk-8.0.232.09-hotspot/jre/lib/ext/sunjce_provider.jar )
policy: evaluate principals:
Policy Principals: []
Active Principals: []
policy:   granting ("java.security.AllPermission" "" "")
policy: evaluation (codesource/principals) passed


Thanks,
Mrinal
-Original Message-
From: Andrea Cosentino  
Sent: Wednesday, June 17, 2020 4:55 PM
To: users@camel.apache.org
Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

CAUTION - EXTERNAL EMAIL This email originated from outside of Smith Micro 
Software. Do not click links or open attachments unless you recognize the 
sender and know the content is safe.


The keystore password is wrong.

Il mer 17 giu 2020, 22:33 Mrinal Sharma  ha scritto:

> Can you elaborate more?
>
> -Original Message-
> From: Andrea Cosentino 
> Sent: Wednesday, June 17, 2020 3:54 PM
> To: users@camel.apache.org
> Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE
>
> CAUTION - EXTERNAL EMAIL This email originated from outside of Smith 
> Micro Software. Do not click links or open attachments unless you 
> recognize the sender and know the content is safe.
>
>
> The error is explicit.
>
> Il mer 17 giu 2020, 21:47 Mrinal Sharma  ha
> scritto:
>
> > Hello,
> >
> > I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE) 
> > application which loads PKCS12 file in UAAServer. Once I added Camel 
> > 3 Dependency the KeyStore API's started giving errors.
> >
> > 
> > --
> > 
> > --
> > ---
> >
> > KeyPair keyPair = new KeyStoreKeyFactory(
> >  new
> > ClassPathResource(uaaProperties.getKeyStore().getName()),
> > uaaProperties.getKeyStore().getPassword().toCharArray())
> >  .getKeyPair(uaaProperties.getKeyStore().getAlias());
> >
> > 
> > --
> > 
> > --
> > ---
> > The error that is thrown is :
> > Caused by: java.io.IOException: keystore password was incorrect
> >
> > Why would addition of Camel 3 cause this error?
> >
> > Thanks,
> > Mrinal Sharma
> >
> >
> >
>


Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Andrea Cosentino
The keystore password is wrong.

Il mer 17 giu 2020, 22:33 Mrinal Sharma  ha scritto:

> Can you elaborate more?
>
> -Original Message-
> From: Andrea Cosentino 
> Sent: Wednesday, June 17, 2020 3:54 PM
> To: users@camel.apache.org
> Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE
>
> CAUTION - EXTERNAL EMAIL This email originated from outside of Smith Micro
> Software. Do not click links or open attachments unless you recognize the
> sender and know the content is safe.
>
>
> The error is explicit.
>
> Il mer 17 giu 2020, 21:47 Mrinal Sharma  ha
> scritto:
>
> > Hello,
> >
> > I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE)
> > application which loads PKCS12 file in UAAServer. Once I added Camel 3
> > Dependency the KeyStore API's started giving errors.
> >
> > --
> > --
> > ---
> >
> > KeyPair keyPair = new KeyStoreKeyFactory(
> >  new
> > ClassPathResource(uaaProperties.getKeyStore().getName()),
> > uaaProperties.getKeyStore().getPassword().toCharArray())
> >  .getKeyPair(uaaProperties.getKeyStore().getAlias());
> >
> > --
> > --
> > ---
> > The error that is thrown is :
> > Caused by: java.io.IOException: keystore password was incorrect
> >
> > Why would addition of Camel 3 cause this error?
> >
> > Thanks,
> > Mrinal Sharma
> >
> >
> >
>


RE: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Mrinal Sharma
Can you elaborate more?

-Original Message-
From: Andrea Cosentino  
Sent: Wednesday, June 17, 2020 3:54 PM
To: users@camel.apache.org
Subject: Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

CAUTION - EXTERNAL EMAIL This email originated from outside of Smith Micro 
Software. Do not click links or open attachments unless you recognize the 
sender and know the content is safe.


The error is explicit.

Il mer 17 giu 2020, 21:47 Mrinal Sharma  ha scritto:

> Hello,
>
> I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE) 
> application which loads PKCS12 file in UAAServer. Once I added Camel 3 
> Dependency the KeyStore API's started giving errors.
>
> --
> --
> ---
>
> KeyPair keyPair = new KeyStoreKeyFactory(
>  new 
> ClassPathResource(uaaProperties.getKeyStore().getName()),
> uaaProperties.getKeyStore().getPassword().toCharArray())
>  .getKeyPair(uaaProperties.getKeyStore().getAlias());
>
> --
> --
> ---
> The error that is thrown is :
> Caused by: java.io.IOException: keystore password was incorrect
>
> Why would addition of Camel 3 cause this error?
>
> Thanks,
> Mrinal Sharma
>
>
>


Re: Apache Camel Issue with Spring Boot 2.1.9 RELEASE

2020-06-17 Thread Andrea Cosentino
The error is explicit.

Il mer 17 giu 2020, 21:47 Mrinal Sharma  ha scritto:

> Hello,
>
> I have a Jhipster UAA Server based Spring Boot(2.1.9 RELEASE) application
> which loads PKCS12 file in UAAServer. Once I added Camel 3 Dependency the
> KeyStore API's started giving errors.
>
> ---
>
> KeyPair keyPair = new KeyStoreKeyFactory(
>  new ClassPathResource(uaaProperties.getKeyStore().getName()),
> uaaProperties.getKeyStore().getPassword().toCharArray())
>  .getKeyPair(uaaProperties.getKeyStore().getAlias());
>
> ---
> The error that is thrown is :
> Caused by: java.io.IOException: keystore password was incorrect
>
> Why would addition of Camel 3 cause this error?
>
> Thanks,
> Mrinal Sharma
>
>
>


Re: Apache Camel - Adding schema registry does not consume messages

2019-02-15 Thread Andrea Cosentino
for the moment

--
Andrea Cosentino 
--
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Friday, February 15, 2019, 3:26:54 PM GMT+1, Andrea Cosentino 
 wrote: 





No. There is no support for confluent stuff in camel-kafka

--
Andrea Cosentino 
--
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Friday, February 15, 2019, 3:22:45 PM GMT+1, Gandhi, Rimi 
 wrote: 





Hi,
I have tried adding schema registry URL by creating a 
CamelKafkaAvroDeserializer class which is used for desirializtion. No errors 
turn out. Still, unable to consume the messages. Is there any work around for 
confluent schema registry url for consuming messages?


Regards,
Rimi Gandhi
*
This e-mail may contain confidential or privileged information.
If you are not the intended recipient, please notify the sender immediately and 
then delete it.

TIAA
*


Re: Apache Camel - Adding schema registry does not consume messages

2019-02-15 Thread Andrea Cosentino
No. There is no support for confluent stuff in camel-kafka

--
Andrea Cosentino 
--
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Friday, February 15, 2019, 3:22:45 PM GMT+1, Gandhi, Rimi 
 wrote: 





Hi,
I have tried adding schema registry URL by creating a 
CamelKafkaAvroDeserializer class which is used for desirializtion. No errors 
turn out. Still, unable to consume the messages. Is there any work around for 
confluent schema registry url for consuming messages?


Regards,
Rimi Gandhi
*
This e-mail may contain confidential or privileged information.
If you are not the intended recipient, please notify the sender immediately and 
then delete it.

TIAA
*


Re: Apache Camel Question

2018-12-05 Thread Claus Ibsen
Hi

No removal is not supported. The file component is primary designed
for exchange data via files.
Not really for monitoring directory folders. Also the original Java
File API didnt support this either.

You can use the newer Java File API for this.

And its not on the roadmap to add this feature as it would require
significant changes to use the newer
Java file API which also can have slightly different way of operating
depending on the underlying File system.

And its not a common use-case (yet) to react on files being deleted.


On Wed, Nov 21, 2018 at 2:39 PM Piotr Niewinski
 wrote:
>
> Hello Apache Camel Team,
>
> We are currently working on a project and we have been using Apache Camel
> for one year now. Great product.
>
> Recently we wanted to use it for monitoring file changes when user
> creates/modifes/removes files. First two options work perfectly fine, but
> detecting manually removed files/directories seems to be not supported by
> Camel.
>
> The questions is: is it possible to somehow detect manually removed files,
> ofc with Apache Camel File component.
>
> PS. What do you think about adding such feature?
>
> Created stackoverflow question:
> https://stackoverflow.com/questions/53374643/apache-camel-to-detect-manually-removed-files
>
>
> Thanks & Best regards,
> P. Niewiński
>
>
> Pozdrawiam
> P. Niewiński



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


Re: Apache Camel Question

2018-11-21 Thread FabryProg
Hello guys

You can use file2 component to scan directory recursively, the output can
be write into a file/db.

You can use a custom query every loop time to changes detection.



Il giorno Mer 21 Nov 2018, 14:39 Piotr Niewinski <
niewinskipiotr1...@gmail.com> ha scritto:

> Hello Apache Camel Team,
>
> We are currently working on a project and we have been using Apache Camel
> for one year now. Great product.
>
> Recently we wanted to use it for monitoring file changes when user
> creates/modifes/removes files. First two options work perfectly fine, but
> detecting manually removed files/directories seems to be not supported by
> Camel.
>
> The questions is: is it possible to somehow detect manually removed files,
> ofc with Apache Camel File component.
>
> PS. What do you think about adding such feature?
>
> Created stackoverflow question:
>
> https://stackoverflow.com/questions/53374643/apache-camel-to-detect-manually-removed-files
>
>
> Thanks & Best regards,
> P. Niewiński
>
>
> Pozdrawiam
> P. Niewiński
>


RE: Apache camel rest dsl RestBindingMode.json is throwing exception

2018-10-25 Thread Valdis Andersons
Hi Rahul,

Could you try simplifying the route to determine where it's starting to break 
down for you? Initially just declare something trivial with just the endpoint, 
mapping and processor.

restConfiguration().component("spark-rest").bindingMode(RestBindingMode.json);
rest("/balance").post("/update")
  .type(BalanceInfo.class)
  .route()
  .process(this::process)
  .endRest();

Call you bean from the process method and see if that still works. If it's 
working, then start adding the other configuration bits one by one and see 
where things start falling over, that might help track things down faster.


Regards,
Valdis

-Original Message-
From: rahul vashishth [mailto:vrahul1...@gmail.com] 
Sent: 23 October 2018 15:03
To: users@camel.apache.org
Subject: Apache camel rest dsl RestBindingMode.json is throwing exception

I am trying to build rest api using camel-rest-dsl. I have tried with multiple 
provider, spark-rest, jetty. But it throwing marshelling exception when i use 
RestBindingMode.json, if i remove rest binding mode then it works fine with 
string type.

I am using version 2.22.1

*SpringRouteBuilder*
*--*
@Component
public class RestAPIRoutes extends SpringRouteBuilder {
@Override
public void configure() throws Exception {
restConfiguration().component("spark-rest")
.bindingMode(RestBindingMode.json)
.port(8787)
.dataFormatProperty("prettyPrint","true");


rest("/balance").produces("application/json").consumes("application/json")
/* mock api */

.get("/query").route().bean(BalanceService.class,"fetchBalance").endRest()
/* fetch balance by msisdn*/
.get("/query/{msisdn}").description("Fetch line balance by
msisdn")

.type(BalanceInfo.class).to("bean:balanceService?method=fetchBalance(${header.msisdn})")

.post("/update").type(BalanceInfo.class).outType(BalanceInfo.class).to("bean:balanceService?method=updateBalance");
}
}

Here balanceService is a simple Spring @Service with overloaded method and 
BalanceInfo is simple pojo class with two field and getter setters.

*Pom dependency*

  
org.apache.camel
camel-spark-rest
2.22.1


org.apache.camel
camel-spring-boot-starter
2.22.1


*Exception*

org.apache.camel.processor.binding.BindingException: Cannot bind to json as 
message body is not json compatible.
Exchange[ID-LTB0202777-MAC-1540301942376-3-1]
at
org.apache.camel.processor.RestBindingAdvice.unmarshal(RestBindingAdvice.java:317)
~[camel-core-2.22.1.jar:2.22.1]
at
org.apache.camel.processor.RestBindingAdvice.before(RestBindingAdvice.java:137)
~[camel-core-2.22.1.jar:2.22.1]


Please help

Rahul

Vhi Group DAC (Vhi) is a holding company for insurance and healthcare services, 
which include Vhi Healthcare DAC, Vhi Insurance DAC, Vhi Health Services DAC 
and Vhi Investments DAC. Vhi Healthcare DAC trading as Vhi Healthcare and Vhi 
Insurance DAC trading as Vhi Insurance are regulated by the Central Bank of 
Ireland. Vhi Healthcare is tied to Vhi Insurance DAC for health insurance in 
Ireland which is underwritten by Vhi Insurance DAC. Vhi Healthcare is tied to 
Zurich Life Assurance plc for Vhi Life Term Insurance and Vhi Mortgage 
Protection which is underwritten by Zurich Life Assurance plc. Vhi Healthcare 
is tied to Collinson Insurance Services Limited for MultiTrip Travel Insurance, 
Backpacker Travel Insurance and Vhi Dental Insurance which are underwritten by 
Great Lakes Insurance SE, UK branch and for Vhi Canada Cover and Vhi 
International Health Insurance which are underwritten by Astrenska Insurance 
Limited. For more information about the Vhi Group please go to: 
https://www.vhi.ie/about-vhi. 


Tá Vhi Group DAC (Vhi) ina chuideachta sealbhaíochta le haghaidh seirbhísí 
árachais agus seirbhísí cúram sláinte, lena n-áirítear Vhi Healthcare DAC, Vhi 
Insurance DAC, Vhi Health Services DAC agus Vhi Investments DAC. Déanann Banc 
Ceannais na hÉireann rialáil ar Vhi Healthcare DAC, ag trádáil dó mar Vhi 
Healthcare, agus ar Vhi Insurance DAC, ag trádáil dó mar Vhi Insurance. Tá Vhi 
Healthcare ceangailte le Vhi Insurance DAC le haghaidh árachas sláinte in 
Éirinn, rud atá frithgheallta ag Vhi Insurance DAC. Tá Vhi Healthcare 
ceangailte le Zurich Life Assurance plc le haghaidh Árachais Saoil de chuid Vhi 
agus Árachas Cosanta Morgáiste de chuid Vhi atá frithgheallta ag Zurich Life 
Assurance plc. Tá Vhi Healthcare ceangailte le Collinson Insurance Services 
Limited le haghaidh Árachas Taistil Ilturais agus Turasóirí Mála Droma agus 
Árachas Fiaclóireachta de chuid Vhi atá frithgheallta ag Great Lakes Insurance 
SE, UK branch agus le haghaidh Clúdach Cheanada de chuid Vhi agus Árachas 
Sláinte Idirnáisiúnta de chuid Vhi atá frithgheallta ag Astrenska Insurance 
Limited. Chun tuilleadh faisnéise a fháil faoi Ghrúpa Vhi, tabhair cuairt ar: 

Re: Apache Camel JAXB unmarshalling returns null properties after upgrade from Camel from 2.20.4 to 2.21.2 or 2.22.1

2018-10-10 Thread Alex Dettinger
Hi Lars,

  You're right, this behavior changed in jaxb-impl 2.3.0.

  You may workaround by force downgrading the version in your pom file:

com.sun.xml.bind
jaxb-impl
2.2.11


  Or changing your class definition with something as below:
@XmlRootElement(name = "entry", namespace = "http://www.w3.org/2005/Atom;)
@XmlAccessorType(XmlAccessType.FIELD)
public class SuccessResponse {
@XmlElement(namespace = "http://www.w3.org/2005/Atom;)
private String id;
...
}

HTH,
Alex

On Wed, Oct 10, 2018 at 11:26 AM Lars Schaps  wrote:

> Hello again.
> Sorry, for posting again, but it seems my digital signature cause problem.
> Did not expect that.
>
> Lars
>
> > Hi all.
> >
> > Sorry for cross posting. I already asked this question on Stack Overflow
> > before I found the mailing list:
> >
> https://stackoverflow.com/questions/52716828/apache-camel-jaxb-unmarshalling-
> > returns-null-properties-after-upgrade-from-camel
> >
> > After upgrading Apache Camel from 2.20.4 to 2.21.2 or even 2.22.1 a unit
> test
> > of my fails and I can't see why.
> >
> > I have a route, which receives an XML response, which I want to
> unmarshal into
> > a data class. This fails since Apache Camel 2.21.2.
> >
> > The JAXB context knows all data classes in the given package and picks
> the
> > right class. The unmarshaller creates the right object, but the
> properties
> > stay null. With debugging the SAX parser, it seemed as if the SAX parser
> > deliberately ignores the text between the tags.
> >
> > I have seen on the Camel website that Camel 2.21.0 "Upgraded to JAXB
> 2.3.0". I
> > don't know what that means for me.
> >
> > My route looks like this:
> >
> > @Component
> > public class NewsletterRoute extends RouteBuilder {
> >
> > 8<-
> >
> > @Override
> > public void configure() {
> > final DataFormat marshalFormat =
> > new JacksonDataFormat(HybrisRequest.class);
> > final JaxbDataFormat unmarshalFormat = new JaxbDataFormat();
> > unmarshalFormat.setContextPath(
> >SuccessResponse.class.getPackage().getName());
> >
> > from(URI)
> > .routeId("subscribeRoute")
> > // Fetch the auth token to send it as 'x-csrf-token' header.
> > .setHeader(Exchange.HTTP_URI,
> > method(this.backendUrlProvider, "getUrl"))
> > .setHeader(Exchange.HTTP_PATH,
> >  constant(this.subscribeUnsubscribePath))
> > .setHeader(Exchange.HTTP_METHOD, HttpMethods.POST)
> > .setHeader(Exchange.CONTENT_TYPE, constant("application/json"))
> > // Marshal body to JSON
> > .marshal(marshalFormat)
> > .to(String.format("https4:backend" +
> > "?sslContextParameters=hybrisSslContextParams" +
> > "=hybrisHostnameVerifier" +
> > // don't throw on 3XX/4XX/5XX since
> > // we need the response body
> > "=false" +
> > "=#hybrisCookieStore" +
> > "=%s" +
> > "=%s" +
> > "=true" +
> > "=true" +
> > "=3" +
> > "=%d" +
> > "=%d",
> > "RAW(" + username + ")",
> > "RAW(" + password + ")",
> > backendTimeoutMillis,
> > backendTimeoutMillis))
> > .convertBodyTo(String.class)
> > // Store the received response as property before
> > // trying to unmarshal it
> > .setProperty(PROPERTY_RESPONSE_RAW, body())
> > .unmarshal(unmarshalFormat);
> > // @formatter:on
> > }
> > }
> >
> >
> > The data class looks like this
> >
> > @XmlRootElement(name = "entry", namespace = "http://www.w3.org/2005/Atom
> ")
> > public class SuccessResponse {
> > private String id;
> > private String title;
> > public String getId() { return id; }
> > public void setId(String id) { this.id = id; }
> > public String getTitle() { return title; }
> > public void setTitle(String title) { this.title = title; }
> > public String toString() { /*code cut out*/}
> > }
> >
> >
> > With Apache Camel 2.20.4 my unit test worked. With 2.21.2 and 2.22.1 it
> > breaks. The problem is, that the unmarshaler won't fill the properties.
> >
> > The unit test just sends a valid request to Mockito, which returns the
> XML.
> >
> > 
> >  > xml:base="
> https://xxx.xxx.xxx.xxx:44380/sap/opu/odata/sap/CUAN_IMPORT_SRV
> > /"
> > xmlns="http://www.w3.org/2005/Atom;
> > xmlns:m="
> http://schemas.microsoft.com/ado/2007/08/dataservices/metadata;
> > xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices;>
> >  -->
> > bla
> > blub
> > 
> >
> >
> > Any ideas?
> >
> > Thanks
> > Lars
>


RE: Apache Camel JAXB unmarshalling returns null properties after upgrade from Camel from 2.20.4 to 2.21.2 or 2.22.1

2018-10-10 Thread Lars Schaps
Hello again.
Sorry, for posting again, but it seems my digital signature cause problem. Did 
not expect that.

Lars

> Hi all.
> 
> Sorry for cross posting. I already asked this question on Stack Overflow
> before I found the mailing list:
> https://stackoverflow.com/questions/52716828/apache-camel-jaxb-unmarshalling-
> returns-null-properties-after-upgrade-from-camel
> 
> After upgrading Apache Camel from 2.20.4 to 2.21.2 or even 2.22.1 a unit test
> of my fails and I can't see why.
> 
> I have a route, which receives an XML response, which I want to unmarshal into
> a data class. This fails since Apache Camel 2.21.2.
> 
> The JAXB context knows all data classes in the given package and picks the
> right class. The unmarshaller creates the right object, but the properties
> stay null. With debugging the SAX parser, it seemed as if the SAX parser
> deliberately ignores the text between the tags.
> 
> I have seen on the Camel website that Camel 2.21.0 "Upgraded to JAXB 2.3.0". I
> don't know what that means for me.
> 
> My route looks like this:
> 
> @Component
> public class NewsletterRoute extends RouteBuilder {
> 
> 8<-
> 
> @Override
> public void configure() {
> final DataFormat marshalFormat =
> new JacksonDataFormat(HybrisRequest.class);
> final JaxbDataFormat unmarshalFormat = new JaxbDataFormat();
> unmarshalFormat.setContextPath(
>SuccessResponse.class.getPackage().getName());
> 
> from(URI)
> .routeId("subscribeRoute")
> // Fetch the auth token to send it as 'x-csrf-token' header.
> .setHeader(Exchange.HTTP_URI,
> method(this.backendUrlProvider, "getUrl"))
> .setHeader(Exchange.HTTP_PATH,
>  constant(this.subscribeUnsubscribePath))
> .setHeader(Exchange.HTTP_METHOD, HttpMethods.POST)
> .setHeader(Exchange.CONTENT_TYPE, constant("application/json"))
> // Marshal body to JSON
> .marshal(marshalFormat)
> .to(String.format("https4:backend" +
> "?sslContextParameters=hybrisSslContextParams" +
> "=hybrisHostnameVerifier" +
> // don't throw on 3XX/4XX/5XX since
> // we need the response body
> "=false" +
> "=#hybrisCookieStore" +
> "=%s" +
> "=%s" +
> "=true" +
> "=true" +
> "=3" +
> "=%d" +
> "=%d",
> "RAW(" + username + ")",
> "RAW(" + password + ")",
> backendTimeoutMillis,
> backendTimeoutMillis))
> .convertBodyTo(String.class)
> // Store the received response as property before
> // trying to unmarshal it
> .setProperty(PROPERTY_RESPONSE_RAW, body())
> .unmarshal(unmarshalFormat);
> // @formatter:on
> }
> }
> 
> 
> The data class looks like this
> 
> @XmlRootElement(name = "entry", namespace = "http://www.w3.org/2005/Atom;)
> public class SuccessResponse {
> private String id;
> private String title;
> public String getId() { return id; }
> public void setId(String id) { this.id = id; }
> public String getTitle() { return title; }
> public void setTitle(String title) { this.title = title; }
> public String toString() { /*code cut out*/}
> }
> 
> 
> With Apache Camel 2.20.4 my unit test worked. With 2.21.2 and 2.22.1 it
> breaks. The problem is, that the unmarshaler won't fill the properties.
> 
> The unit test just sends a valid request to Mockito, which returns the XML.
> 
> 
>  xml:base="https://xxx.xxx.xxx.xxx:44380/sap/opu/odata/sap/CUAN_IMPORT_SRV
> /"
> xmlns="http://www.w3.org/2005/Atom;
> xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata;
> xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices;>
> 
> bla
> blub
> 
> 
> 
> Any ideas?
> 
> Thanks
> Lars


Re: Apache Camel branded Swag!

2018-06-14 Thread Steve Hiller
Which component do I use to order? 

On Thursday, June 14, 2018 8:26 AM, Zoran Regvart  wrote:
 

 Hi Cameleers,
with great joy I'm happy to announce that Camel branded swag:
T-Shirts, Cases, Posters, Mugs, Notebooks and a whole lot more, is
available at the official Apache Software Foundation store at
Redbubble.

Peruse it here:

https://www.redbubble.com/people/comdev/works/32232604-apache-camel?asc=u

>From any purchases you make a percentage goes as a donation to the ASF.

zoran
-- 
Zoran Regvart


   

Re: Apache camel + cassadra integration

2018-06-13 Thread Andrea Cosentino
I added an example on doc of the component

https://github.com/apache/camel/blob/master/components/camel-cassandraql/src/main/docs/cql-component.adoc

--
Andrea Cosentino 
--
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Tuesday, June 12, 2018, 2:51:02 PM GMT+2, AMRUT MALAJI 
 wrote: 





Hi,

I browsed thorough internet and couldnt find an example of storing data
into cassandra table?
should i be setting the column data as object in the Exchange Body and send
it to the cassandra endpoint?
if i do so? - will end up creating connection everytime i do an insert?

kindly help me by sharing example.

Note: I am trying to store image in of the column as blob (in cassandra /)

-- 


*Thanks & Regards Amrut K. Malaji9611599155*


Re: Apache camel and IBM MQ

2018-05-05 Thread Willem Jiang
Hi,
It could be a while, I'm not sure if you already find a way to resolve this
kind question.
Here are some pointers which may help you out:
1.You can take a look at the camel-jms component[1] or camel-sjms[2] which
supports the stand JMS message, which could be use to connect the IBM MQ.
2. With the Bean Integration you can add some annotation in your business
implementation bean to handle the message.

[1]
https://github.com/apache/camel/blob/master/components/camel-jms/src/main/docs/jms-component.adoc
[2]
https://github.com/apache/camel/blob/master/components/camel-sjms/src/main/docs/sjms-component.adoc
[3]http://camel.apache.org/pojo-consuming.html


Willem Jiang

Blog: http://willemjiang.blogspot.com (English)
  http://jnn.iteye.com  (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Apr 11, 2018 at 10:18 AM, Pranay Tonpay  wrote:

> Hi,
> I was looking for some sample code integrating Apache Camel and IBM MQ that
> uses pure annotation driven approach. Can someone please provide me some
> pointers ?
>
> thx
> pranay
>


Re: Apache Camel - rabbitmq - ssl ( not working )

2018-04-22 Thread Zoran Regvart
Hi Pranay,
seems that you have a network issue (Connection refused), make sure
that the configuration references the right host/port combination. I
have found that setting `-Djavax.net.debug=all` JVM property is quite
helpful to diagnose such issues.

zoran

On Wed, Apr 11, 2018 at 4:20 AM, Pranay Tonpay  wrote:
> I am trying to use apache camel ( camel-spring-boot - 2.20.2 ) with
> rabbitmq and create routes. It does work fine when iI use un-secured
> RabbitMQ ( no-SSL ), but when iI try to connect to RabbitMQ using SSL, it's
> not connecting to the queue at all. I am using "connectionFactory" option
> given on Apache Camel page. This connectionFactory object has all the
> correct parameters set (useSslProtocol, username, password etc ) Please
> note that the connectionFactory is properly populated, as iI am able to use
> it to connect using the other way (setting it in setConnectionFactory on
> SimpleMessageListenerContainer ). But with Apache Camel iI am facing issues.
>
> java.net.ConnectException: Connection refused (Connection refused)
> at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_161]
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
> ~[?:1.8.0_161]
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> ~[?:1.8.0_161]
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> ~[?:1.8.0_161]
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> ~[?:1.8.0_161]
> at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_161]
> at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
> ~[?:1.8.0_161]
> at
> com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:50)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:918)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:870)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:828)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:996)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
> at
> org.apache.camel.component.rabbitmq.RabbitMQEndpoint.connect(RabbitMQEndpoint.java:248)
> ~[camel-rabbitmq-2.20.2.jar!/:2.20.2]
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.openConnection(RabbitMQConsumer.java:64)
> ~[camel-rabbitmq-2.20.2.jar!/:2.20.2]
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.getConnection(RabbitMQConsumer.java:75)
> ~[camel-rabbitmq-2.20.2.jar!/:2.20.2]
> at
> org.apache.camel.component.rabbitmq.RabbitConsumer.(RabbitConsumer.java:55)
> [camel-rabbitmq-2.20.2.jar!/:2.20.2]
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.createConsumer(RabbitMQConsumer.java:120)
> [camel-rabbitmq-2.20.2.jar!/:2.20.2]



-- 
Zoran Regvart


Re: Apache camel - rabbitmq - ssl ( not working )

2018-03-28 Thread Pranay Tonpay
Pls advise on the possible causes of this or if more information is needed

On Mon, Mar 26, 2018, 11:24 PM Pranay Tonpay  wrote:

> I am trying to use apache camel ( camel-spring-boot - 2.20.2 ) with
> rabbitmq and create routes. It does work fine when iI use un-secured
> RabbitMQ ( no-SSL ), but when iI try to connect to RabbitMQ using SSL,
> it's not connecting to the queue at all. I am using "connectionFactory"
> option given on Apache Camel page. This connectionFactory object has all
> the correct parameters set (useSslProtocol, username, password etc ) Please
> note that the connectionFactory is properly populated, as iI am able to
> use it to connect using the other way (setting it in setConnectionFactory
> on SimpleMessageListenerContainer ). But with Apache Camel iI am facing
> issues.
>
> java.io.IOException: null at
> com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:116)
> ~[amqp-client-4.1.0.jar!/:4.1.0] at
> com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:112)
> ~[amqp-client-4.1.0.jar!/:4.1.0] at
> com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:360)
> ~[amqp-client-4.1.0.jar!/:4.1.0] at
> com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:62)
> ~[amqp-client-4.1.0.jar!/:4.1.0] Caused by:
> com.rabbitmq.client.ShutdownSignalException: connection error at
> com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)
> ~[amqp-client-4.1.0.jar!/:4.1.0] * * Caused by: java.io.EOFException at
> java.io.DataInputStream.readUnsignedByte(DataInputStream.java:290)
> ~[?:1.8.0_161] at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:91)
> ~[amqp-client-4.1.0.jar!/:4.1.0]
>
> While browsing more, iI came across this link Apache Camel SSL RabbitMQ
> 
>
> but this seems to be a bit old, so may not be relevant anymore.
>
> Please advise. This has become a show-stopper for us.
>


Re: Apache Camel vs Apache Storm

2018-02-15 Thread Mark Nuttall
What is it that you are trying to do? There is a plethora of projects on
Apache.org. Some do sort of the same thing. Some do some of the same
things. Some don't.

On Thu, Feb 15, 2018 at 4:30 PM, Guillermo Castro 
wrote:

> Apache Storm is a distributed real-time computation system whose main
> purpose is the real-time processing of data, and from what I know, is
> limited to connecting queueing systems and databases.
>
> Apache Camel is an Enterprise Integration Pattern system which allows
> you to connect, route and process data from a vast array of current
> and legacy systems.
>
> You can integrate both systems to cover different needs in your
> project (e.g. data processing using Storm, REST interfaces using
> camel, etc).
>
> Hope that helps.
>
> On Thu, Feb 15, 2018 at 3:00 PM, Pavel Sapozhnikov
>  wrote:
> > Hello
> >
> > I am new to Camel but I have some brief knowledge of Storm and how that
> > works. We're trying to investigate both libraries for the project that
> > we're about to do and we're deciding between Camel and Storm. What are
> some
> > of the key decision factors that we should be focused on when it comes to
> > both applications.
> >
> > Our project needs to subscribe to JMS, archive messages, transform
> messages
> > in some cases from one format to another and save into database.
> >
> > We have a prototype of Storm doing this but how can Camel do this better?
> > Are the two libraries used for different purposes?
> >
> > Thanks
> > Pavel
>
>
>
> --
> Guillermo Castro
> webmas...@javageek.org   http://javageek.org/
>


Re: Apache Camel vs Apache Storm

2018-02-15 Thread Guillermo Castro
Apache Storm is a distributed real-time computation system whose main
purpose is the real-time processing of data, and from what I know, is
limited to connecting queueing systems and databases.

Apache Camel is an Enterprise Integration Pattern system which allows
you to connect, route and process data from a vast array of current
and legacy systems.

You can integrate both systems to cover different needs in your
project (e.g. data processing using Storm, REST interfaces using
camel, etc).

Hope that helps.

On Thu, Feb 15, 2018 at 3:00 PM, Pavel Sapozhnikov
 wrote:
> Hello
>
> I am new to Camel but I have some brief knowledge of Storm and how that
> works. We're trying to investigate both libraries for the project that
> we're about to do and we're deciding between Camel and Storm. What are some
> of the key decision factors that we should be focused on when it comes to
> both applications.
>
> Our project needs to subscribe to JMS, archive messages, transform messages
> in some cases from one format to another and save into database.
>
> We have a prototype of Storm doing this but how can Camel do this better?
> Are the two libraries used for different purposes?
>
> Thanks
> Pavel



-- 
Guillermo Castro
webmas...@javageek.org   http://javageek.org/


Re: Apache camel with spring 5.x

2018-01-05 Thread Claus Ibsen
Hi

You can try using Spring 5, I don't think there is any problems using
it with Camel 2.20.x etc.
However Spring Boot 2 is not API compatible and you cannot use it with
Camel yet.

Support for this will come later (Camel 2.22 or later).



On Fri, Jan 5, 2018 at 12:58 PM, Sujay Bawaskar  wrote:
> Hi,
>
> Is camel 20.x compatible with spring 5.x? Or do we have to wait for a
> release?
>
> --
> Thanks,
> Sujay P Bawaskar
> M:+91-77091 53669



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


Re: Apache camel with spring 5.x

2018-01-05 Thread Sujay Bawaskar
Thanks Andrea! Any plan to upgrade to 5.x? I see even spring boot is also
not available with spring 5x.

On Fri, Jan 5, 2018 at 5:29 PM, Andrea Cosentino <
ancosen1...@yahoo.com.invalid> wrote:

> No, 2.20.x is based on spring 4.
> --Andrea Cosentino --Apache Camel PMC
> MemberApache Karaf CommitterApache Servicemix PMC MemberEmail:
> ancosen1985@yahoo.comTwitter: @oscerd2Github: oscerd
>
> On Friday, January 5, 2018, 12:58:14 PM GMT+1, Sujay Bawaskar <
> sujaybawas...@gmail.com> wrote:
>
>  Hi,
>
> Is camel 20.x compatible with spring 5.x? Or do we have to wait for a
> release?
>
> --
> Thanks,
> Sujay P Bawaskar
> M:+91-77091 53669
>




-- 
Thanks,
Sujay P Bawaskar
M:+91-77091 53669


Re: Apache camel with spring 5.x

2018-01-05 Thread Andrea Cosentino
No, 2.20.x is based on spring 4.
--Andrea Cosentino --Apache Camel PMC 
MemberApache Karaf CommitterApache Servicemix PMC MemberEmail: 
ancosen1985@yahoo.comTwitter: @oscerd2Github: oscerd 

On Friday, January 5, 2018, 12:58:14 PM GMT+1, Sujay Bawaskar 
 wrote:  
 
 Hi,

Is camel 20.x compatible with spring 5.x? Or do we have to wait for a
release?

-- 
Thanks,
Sujay P Bawaskar
M:+91-77091 53669
  

Re: Apache Camel - ftp component - need to use absolute path

2017-09-14 Thread Zoran Regvart
Hi Ceyhan,
I'm bringing this back to the users mailing list, let's have a discussion there.

I'm not privy discussion around using absolute/relative paths, but I
respect the decision that was made as to me it seems that using
relative paths is something most users will want to use.
For example there could be use cases where the FTP service is moved
between two servers and the root of the FTP is changed, with absolute
paths the integration would break and with relative paths it would
adjust just by the virtue of being relative.

zoran

On Thu, Sep 14, 2017 at 2:09 PM,   wrote:
>
>
> Hi Zoran,
>
> As I understand absolute urls will not be supported in the feature.
>
> The strange thing is that 
> org.apache.camel.component.file.remote.FtpOperations  (implementation of the 
> org.apache.camel.component.file.remote.RemoteFileOperations interface ) uses 
> absolute urls for operation!!!
>
> Is not absolute path the cleanest solution?
> Hi Ceyhan,
>
> On Thu, Apr 13, 2017 at 6:00 PM, paul529  wrote:
>> I have been unable to find any detailed description of why absolute paths
>> cannot be supported in the ftp component.
>
> did you see the issues I've linked to?
>
> https://issues.apache.org/jira/browse/CAMEL-8828
> https://issues.apache.org/jira/browse/CAMEL-8844
>
> I agree they are not detailed, but they illustrate some of the issues
> users were facing with absolute paths
>
>> I am trying to use the ftp component to retrieve files from a remote host.
>> I use an idempotent repository with the noop=true setting for the
>> consumer.
>> In this way the remote host is only accessed in a read-only manner.
>>
>> Does the issue with absolute paths have to do with renaming files after
>> processing on the remote host?  Is so, my use case would not require this
>> and would be able to support absolute paths.
>
> that was one of the issues
>
>> Would it be possible to support absolute paths using a property of the the
>> component URI?  Possibly if noop=true is set?
>
> I think that ship has sailed with 2.16, I was not around for the
> discussion on it, perhaps one of the committers from that period could
> shade more light.
>
> But I believe that the stance not to support absolute paths will
> remain in the future, from what I gather these were just one of many
> issues that in the end resulted in not supporting absolute paths.
>
> zoran
> --
> Zoran Regvart
>
> 
> Quoted from:
> http://camel.465427.n5.nabble.com/Apache-Camel-ftp-component-need-to-use-absolute-path-tp5796693p5797648.html
>
>
> _
> Sent from http://camel.465427.n5.nabble.com
>



-- 
Zoran Regvart


Re: Apache Camel Routing: Best practice how to poll an external REST API

2017-08-10 Thread simon_dietschi
Hi shuston,

Thanks for your suggestion using multiple queues as another approach for
polling the results.

In the meantime I ended up implementing some sort of combined future
pattern, where I keep polling by simply calling the endpoint; something
similar to this example here:

https://stackoverflow.com/questions/40251528/how-to-use-executorservice-to-poll-until-a-result-arrives

Cheers,
Simon



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-Routing-Best-practice-how-to-poll-an-external-REST-API-tp5809926p5810172.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel Routing: Best practice how to poll an external REST API

2017-08-08 Thread Steve Huston
I don’t have example code readily available, but one possible approach would be:

- Send job request REST/JSON and get job ID back
- Add ID to a queue of not-yet-done jobs
- A separate route pulls job IDs from the not-done queue and polls
- If not done, put it back on the queue
- If done, put ID on a different queue for done jobs
- A third route pulls job IDs from the done queue and retrieves the search 
result

You’d want some delay or use a timer in combination with the not-done job queue.

-Steve

> On Aug 8, 2017, at 4:12 AM, simon_dietschi  wrote:
> 
> Hi Camel folks,
> 
> I am currently looking for a simple approach achieving the following in
> Apache Camel / Spring Boot:
> 
> 1. Send a search job request to an external REST/JSON API
> 2. Get a search processing job ID from the API
> 3. Poll the API until it returns a JSON response containing a specific
> status = done
> 4. Once status done has been returned, proceed with the retrieval of the
> search result (separate part, considered to be straight forward)
> 
> The first solution one may think of is to implement the Polling Consumer
> pattern, which in my opinion requires too much overhead code (need to
> implement Component, Endpoint, Consumer,...) and more important this pattern
> does the contrary - it returns a message once a message is available (e.g.
> https://github.com/Palo-IT/Examples/tree/master/camel-custom-feedly-component).
> 
> Another approach would be a simple Processor where I loop a defined number
> of times calling the API or using the DSL -> doWhile...
> 
> As I was unable to find a good code snippet, it would be cool if you guys
> can share your thoughts or point me to a good sample.
> 
> Cheers,
> Simon
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-Routing-Best-practice-how-to-poll-an-external-REST-API-tp5809926.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



Re: apache camel toD does not accept a property value of about 40 characters

2017-08-04 Thread Claus Ibsen
There is no limit to the length of options in Camel etc, so I would be
surprised if there is a bug in Camel in this regard. I suggest to dive
deeper. And also test this on newer versions of Camel etc if you can
reproduce on a supported branch. 2.17.x is EOL.

On Wed, Aug 2, 2017 at 4:21 PM, jephreycuma  wrote:
> Hi everyone,
> I calculated a message digest value using DigestUtils.sha1Hex(String value),
> which gave me a long string of about 40 characters (e.g
> dd543d3bcb28e577313f8b945f29a9be7a43c5fd).
> I needed to pass this messageDigest value to my internal camel component
> which in turn is supposed to write it to our DB. To achieve this, I used
>  ="message-history/somevalue/othervaluesmessageDigest=dd543d3bcb28e577313f8b945f29a9be7a43c5fd"
> /> of camel 2.17.5.
> This sent an empty value of messageDigest to my message-history component.
> However when I use
> 
> 
> message-history/somevalue/othervalues=dd543d3bcb28e577313f8b945f29a9be7a43c5fd
> 
> 
> it does send a value of messageDigest to my message-history component, and
> also when I make the value of messageDigest smaller say about 5 characters,
> the  camel toD does send the value of messageDigest.
> Could this be a bug in camel 2.17.5 on toD?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/apache-camel-toD-does-not-accept-a-property-value-of-about-40-characters-tp5809139.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


RE: Apache camel restarting the route

2017-06-16 Thread Steve Huston
The only concept you're missing is that 'from' is not a one shot event. The 
route keeps running, taking whatever messages become available from the source 
queue.

-Steve

> -Original Message-
> From: Mahesha999 [mailto:abnav...@gmail.com]
> Sent: Friday, June 16, 2017 10:19 AM
> To: users@camel.apache.org
> Subject: Apache camel restarting the route
> 
> 
> 
> I have a something as following:
> 
> from("rabbitmq://...")
>  .process(processor1)
> :
>  .process(processorn)
>  .process(SendToExternalAppProcessor)
> 
> The SendToExternalAppProcessor.process() uses producer template to send
> the some request formed from the contents in the exchange parameter to
> another
> rabbitmq2 with sendBody() method.
> 
> The issue is that once SendToExternalAppProcessor.process() executes and
> above route executes, it restarts above route again along with the listener of
> the rabbitmq2.
> 
> What I am missing here? Is there any apache camel configuration that is
> slipping from my attention?
> 
> Also I tried by commenting sendBody() and still restarts the route. I must be
> missing something weird basic setting here...
> 
> *PS:* I know I have not given any concrete code here so as to replicate the
> scenario on your machine, but am in hope that experienced head and eyes
> will be quick to recall and suggest something. (Also I cannot straightway 
> share
> my project code and also its big and complex)
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Apache-
> camel-restarting-the-route-tp5804637.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel kakfa Component making the route run continously infinitely

2017-05-30 Thread darwinanirudh
Thank you for the response.

Apologies if i am wrong , the producer and consumer should have the same
topic name if i am not wrong?

callkafkaSuspenseProducer- This is the producer.

callkafkaSuspenseConsumer - This is the consumer.

regards
Darwin



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-kakfa-Component-making-the-route-run-continously-infinitely-tp5800761p5801356.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel kakfa Component making the route run continously infinitely

2017-05-30 Thread Claus Ibsen
It looks like you use the same topic name, and then send the messages
back to yourself

On Fri, May 26, 2017 at 9:26 AM, darwinanirudh  wrote:
> Kakfa consumer and producer for the above post
>
> 
> uri="kafka:${kafkaserver}?topic=SuspendedCdr3zookeeperHost=${zookeeperHost}zookeeperPort=${zookeeperport}serializerClass=kafka.serializer.StringEncoderproducerType=sync"
> />
>
> 
> uri="kafka:${kafkaserver}?topic=SuspendedCdr3zookeeperHost=${zookeeperHost}zookeeperPort=${zookeeperport}serializerClass=kafka.serializer.StringEncoderautoOffsetReset=smallestgroupId=defaultconsumerId=1"
> />
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-kakfa-Component-making-the-route-run-continously-infinitely-tp5800761p5800765.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Apache Camel kakfa Component making the route run continously infinitely

2017-05-26 Thread darwinanirudh
Kakfa consumer and producer for the above post








--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-kakfa-Component-making-the-route-run-continously-infinitely-tp5800761p5800765.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel - ftp component - need to use absolute path

2017-04-13 Thread Zoran Regvart
Hi Ceyhan,

On Thu, Apr 13, 2017 at 6:00 PM, paul529  wrote:
> I have been unable to find any detailed description of why absolute paths
> cannot be supported in the ftp component.

did you see the issues I've linked to?

https://issues.apache.org/jira/browse/CAMEL-8828
https://issues.apache.org/jira/browse/CAMEL-8844

I agree they are not detailed, but they illustrate some of the issues
users were facing with absolute paths

> I am trying to use the ftp component to retrieve files from a remote host.
> I use an idempotent repository with the noop=true setting for the consumer.
> In this way the remote host is only accessed in a read-only manner.
>
> Does the issue with absolute paths have to do with renaming files after
> processing on the remote host?  Is so, my use case would not require this
> and would be able to support absolute paths.

that was one of the issues

> Would it be possible to support absolute paths using a property of the the
> component URI?  Possibly if noop=true is set?

I think that ship has sailed with 2.16, I was not around for the
discussion on it, perhaps one of the committers from that period could
shade more light.

But I believe that the stance not to support absolute paths will
remain in the future, from what I gather these were just one of many
issues that in the end resulted in not supporting absolute paths.

zoran
-- 
Zoran Regvart


Re: Apache Camel - ftp component - need to use absolute path

2017-04-13 Thread paul529
Hi Zoran, 

I have been unable to find any detailed description of why absolute paths
cannot be supported in the ftp component. 

I am trying to use the ftp component to retrieve files from a remote host. 
I use an idempotent repository with the noop=true setting for the consumer. 
In this way the remote host is only accessed in a read-only manner.   

Does the issue with absolute paths have to do with renaming files after
processing on the remote host?  Is so, my use case would not require this
and would be able to support absolute paths. 

Would it be possible to support absolute paths using a property of the the
component URI?  Possibly if noop=true is set? 

Thanks, 
Paul



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-ftp-component-need-to-use-absolute-path-tp5796693p5797645.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel - ftp component - need to use absolute path

2017-04-13 Thread paul529
Hi Zoran,

I have been unable to find any detailed description of why absolute paths
cannot be supported in the ftp component.

I am trying to use the ftp component to retrieve files from a remote host. 
I use an idempotent repository with the noop=true setting for the consumer. 
In this way the remote host is only accessed in a read-only manner.  

Does the issue with absolute paths have to do with renaming files after
processing on the remote host?  Is so, my use case would not require this
and would be able to support absolute paths.

Would it be possible to support absolute paths using a property of the the
component URI?  Possibly if noop=true is set?

Thanks,
Paul



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-ftp-component-need-to-use-absolute-path-tp5796693p5797644.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel - ftp component - need to use absolute path

2017-04-13 Thread paul529
Hi Zoran, 

I have been unable to find any detailed description of why absolute paths
cannot be supported in the ftp component. 

I am trying to use the ftp component to retrieve files from a remote host. 
I use an idempotent repository with the noop=true setting for the consumer. 
In this way the remote host is only accessed in a read-only manner.   

Does the issue with absolute paths have to do with renaming files after
processing on the remote host?  Is so, my use case would not require this
and would be able to support absolute paths. 

Would it be possible to support absolute paths using a property of the the
component URI?  Possibly if noop=true is set? 

Thanks, 
Paul



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-ftp-component-need-to-use-absolute-path-tp5796693p5797646.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel - ftp component - need to use absolute path

2017-03-29 Thread Zoran Regvart
Hi Ceyhan,
around version 2.16 support for absolute paths was dropped, see the
discussion in CAMEL-8828[1] and the linked issue CAMEL-8844[2].

I understand this is a problem for you, but as you can see in those
issues relative paths are better in the long run. Perhaps you can make
a quick fix on the SFTP server by being creative with symlinks?

zoran

[1] https://issues.apache.org/jira/browse/CAMEL-8828
[2] https://issues.apache.org/jira/browse/CAMEL-8844

On Wed, Mar 29, 2017 at 2:11 PM, simpleuser  wrote:
> Hi,
>
> I am trying to upgrade a product that uses an older camel version (2.15.1) .
>
> I am trying to upgrade the camel version to 2.17.5
>
> In the code base, camel ftp component is used with absolute paths...
>
> After upgrade we saw that, files could not be consumed due to the following
> error:
>
> SftpComponent doesn't support absolute paths, "xxx" will be converted to
> "yyy". After Camel 2.16, absolute paths will be invalid.
>
> I can see that absolute paths are not supported starting with 2.16:
>
> http://camel.apache.org/ftp.html 
>
> For our case, it will be very costly to change the existing code base.
>
> My question : Is there any possibility to force camel ftp 2.17.5 to support
> absolute paths as before in 2.15.1 (via config or other setting)?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-ftp-component-need-to-use-absolute-path-tp5796693.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Zoran Regvart


Re: Apache Camel disable DTD validation or resolve to relativ Path

2017-02-22 Thread Claus Ibsen
Hi

I think it can help if you can find any information about Java XML /
StAX / and its XML apis et all how to turn on | off that DTD
validation, or plugin custom resolvers.

It tend to be a mess / mix of ways doing that / if all possible.

Having that we can see if there is something we can add/change in Camel.

Also try with latest release and see how it goes there.

On Tue, Feb 21, 2017 at 7:11 PM, Leber, Thomas
<thomas.le...@omnetric.com> wrote:
> Hi,
>
> I tried this also but the resolver gets not invoked when resolving the dtd, 
> with the xsd it works fine.
>
>
>
> Mit TouchDown von meinem Android-Telefon gesendet (www.symantec.com)
>
> -Original Message-
> From: Claus Ibsen [claus.ib...@gmail.com]
> Received: Dienstag, 21 Feb. 2017, 19:08
> To: users@camel.apache.org [users@camel.apache.org]
> Subject: Re: Apache Camel disable DTD validation or resolve to relativ Path
>
> You can maybe plugin a custom resource resolver and let it return null
> /empty or something.
>
> Check the docs
> https://github.com/apache/camel/blob/master/camel-core/src/main/docs/validator-component.adoc
>
> And you can find some unit tests that test this resolver
>
> On Tue, Feb 21, 2017 at 6:55 PM, Leber, Thomas
> <thomas.le...@omnetric.com> wrote:
>> Hi,
>>
>> I'm using the camel validator component to validate an XML. The XML has a 
>> DTD declaration inside. This points to a relative path, where I don't want 
>> to have the DTD.
>>
>> 
>>
>> Is there any way to disable the DTD validation or resolve the declared DTD 
>> to a path where I want to have the DTD?
>>
>> I tried until now to use the VM property:
>>
>> -Djavax.xml.stream.supportDTD=false
>>
>> but I had no luck with that.
>>
>> While stepping trough the code I also noticed that, between different starts 
>> of camel, it uses once the StAX implementation and another time the SAX. Any 
>> glue why? I'm using all the time the same file and not changing the code.
>>
>> This question is x-posted on 
>> http://stackoverflow.com/questions/42374455/apache-camel-disable-dtd-validation-or-resolve-to-relativ-path
>>
>> Best Regards,
>> Thomas Leber
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



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


RE: Apache Camel disable DTD validation or resolve to relativ Path

2017-02-21 Thread Leber, Thomas
Hi,

I tried this also but the resolver gets not invoked when resolving the dtd, 
with the xsd it works fine.



Mit TouchDown von meinem Android-Telefon gesendet (www.symantec.com)

-Original Message-
From: Claus Ibsen [claus.ib...@gmail.com]
Received: Dienstag, 21 Feb. 2017, 19:08
To: users@camel.apache.org [users@camel.apache.org]
Subject: Re: Apache Camel disable DTD validation or resolve to relativ Path

You can maybe plugin a custom resource resolver and let it return null
/empty or something.

Check the docs
https://github.com/apache/camel/blob/master/camel-core/src/main/docs/validator-component.adoc

And you can find some unit tests that test this resolver

On Tue, Feb 21, 2017 at 6:55 PM, Leber, Thomas
<thomas.le...@omnetric.com> wrote:
> Hi,
>
> I'm using the camel validator component to validate an XML. The XML has a DTD 
> declaration inside. This points to a relative path, where I don't want to 
> have the DTD.
>
> 
>
> Is there any way to disable the DTD validation or resolve the declared DTD to 
> a path where I want to have the DTD?
>
> I tried until now to use the VM property:
>
> -Djavax.xml.stream.supportDTD=false
>
> but I had no luck with that.
>
> While stepping trough the code I also noticed that, between different starts 
> of camel, it uses once the StAX implementation and another time the SAX. Any 
> glue why? I'm using all the time the same file and not changing the code.
>
> This question is x-posted on 
> http://stackoverflow.com/questions/42374455/apache-camel-disable-dtd-validation-or-resolve-to-relativ-path
>
> Best Regards,
> Thomas Leber



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


Re: Apache Camel disable DTD validation or resolve to relativ Path

2017-02-21 Thread Claus Ibsen
You can maybe plugin a custom resource resolver and let it return null
/empty or something.

Check the docs
https://github.com/apache/camel/blob/master/camel-core/src/main/docs/validator-component.adoc

And you can find some unit tests that test this resolver

On Tue, Feb 21, 2017 at 6:55 PM, Leber, Thomas
 wrote:
> Hi,
>
> I'm using the camel validator component to validate an XML. The XML has a DTD 
> declaration inside. This points to a relative path, where I don't want to 
> have the DTD.
>
> 
>
> Is there any way to disable the DTD validation or resolve the declared DTD to 
> a path where I want to have the DTD?
>
> I tried until now to use the VM property:
>
> -Djavax.xml.stream.supportDTD=false
>
> but I had no luck with that.
>
> While stepping trough the code I also noticed that, between different starts 
> of camel, it uses once the StAX implementation and another time the SAX. Any 
> glue why? I'm using all the time the same file and not changing the code.
>
> This question is x-posted on 
> http://stackoverflow.com/questions/42374455/apache-camel-disable-dtd-validation-or-resolve-to-relativ-path
>
> Best Regards,
> Thomas Leber



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


Re: apache camel returns statusCode:500

2016-10-28 Thread meng
Hi Avnish,

Thanks for your replying. I finally found the problem is the json format I
passed to the server is incorrect...Then it works now.
Thanks,

Meng



--
View this message in context: 
http://camel.465427.n5.nabble.com/apache-camel-returns-statusCode-500-tp578p5789367.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel with Play Framework

2016-10-20 Thread vinodkar87
Requirement: Convert the Webservices & MQ's running in WAS 8.5 to Apache
Camel framework project and eliminate WAS 8.5.

Currently we have Play projects running in Play servers(2.2.2). 

Ask is

1. can we deploy the Camel framework in Play?
2. is there any Camel module in Play ?
3. I raised a question in StackOverflow. They said, we can use akka-Camel.
Does akka-camel is suitable for our requirement? 
http://stackoverflow.com/questions/40035993/apache-camel-with-play-framework



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-with-Play-Framework-tp5788760p5789027.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: apache camel returns statusCode:500

2016-10-18 Thread Avnish Pundir
Looks like your web-service is expecting special headers (either content 
type or something alike), you can try setting the content type and also 
set the request type to POST explicitly (in one of the peculiar use case 
I had to use it explicitly) using following code:


.setHeader(Exchange.HTTP_METHOD, constant("POST"))
.setHeader(Exchange.CONTENT_TYPE, constant("application/json"))

I'll still recommend that you either look into your server logs to find 
out exact root cause or enable the TRACE logging for apache http package 
(assuming you are using http or http4 component) to see what's going on 
the wire, compare it what postman is sending and adapt your route 
accordingly.


Thanks,
Avnish Pundir



On 18-10-2016 07:06, meng wrote:

Hi All,
I'm the new of camel. I now use apache camel to call several our
webservices.

Here is my code:
public void configure() throws Exception{
from("direct:start")
.marshal()
.string(UTF_8)
.to(TARGET http)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws
Exception {
String message =
exchange.getIn().getBody(String.class);
System.out.println(message);
}
})
   .to("stream:out");

I'm sure there is no problem about the target endpoint, for I can get
correct response using postman.
But camel give me 500 error.
Caused by: org.apache.camel.http.common.HttpOperationFailedException: HTTP
operation failed invoking http:// with statusCode: 500
at
org.apache.camel.component.http.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:240)
~[camel-http-2.16.1.jar:2.16.1]
at
org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:162)
~[camel-http-2.16.1.jar:2.16.1]
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
~[camel-core-2.16.1.jar:2.16.1]
at 
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:141)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
~[camel-core-2.16.1.jar:2.16.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)
~[camel-core-2.16.1.jar:2.16.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:412)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:380)
~[camel-core-2.16.1.jar:2.16.1]
at 
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:270)
~[camel-core-2.16.1.jar:2.16.1]
at 
org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:380)
~[camel-core-2.16.1.jar:2.16.1]
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:238)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128)
~[camel-core-2.16.1.jar:2.16.1]
at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:132)
~[camel-core-2.16.1.jar:2.16.1]
... 16 common frames omitted

Could you help what's my problem or how can I debug it?
Thanks a lot!



--
View this message in context: 
http://camel.465427.n5.nabble.com/apache-camel-returns-statusCode-500-tp578.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--

--
Disclaimer: The information contained in this communication is 
confidential, private, proprietary, or otherwise privileged and is intended 
only for the use of the addressee.Unauthorized use, disclosure, 
distribution or copying is strictly prohibited and may be unlawful. If you 
have received this communication in 

Re: Apache Camel with Play Framework

2016-10-14 Thread Claus Ibsen
There is no play component from Apache Camel.

Its better to ask the play community if they have any kind of support
for Apache Camel.

However that said. Camel is just a Java library, so if play can run
any Java JARs then you can use Camel also. But you may need to write
some code to create CamelContext and what you need from Camel in play
framework. Where as if they have some kind of Camel component in play,
then that would likely do all this kind of work for you.

On Fri, Oct 14, 2016 at 8:13 AM, vinodkar87  wrote:
> Can we use apache Camel in Play framework?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-with-Play-Framework-tp5788760.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Apache Camel and Hystrix Command Name

2016-10-11 Thread ValeryN
Thanks!!! It worked

 

From: "Claus Ibsen-2 [via Camel]" <ml-node+s465427n578861...@n5.nabble.com>
Date: Tuesday, October 11, 2016 at 09:40
To: ValeryN <novikov.val...@gmail.com>
Subject: Re: Apache Camel and Hystrix Command Name

 

Hi 

I think we made it use the node id as the command name. So you can try 
doing hystrix().id("myNameHere")  


On Tue, Oct 11, 2016 at 6:19 PM, ValeryN <[hidden email]> wrote: 


> I'm really happy to see hystrix support though DSL in a latest Apache Camel 
> version 2.18.0. My question is - how does one name a hystrix command now? 
> 
> Let's say if I write - 
> 
> from("direct:start").hystrix().to("log:out") 
> Hystrix dashboard will register "hystrix1" command and show stat for it, 
> that's the point I wanna change. 
> 
> Hystrix's  EIP doc <http://camel.apache.org/hystrix-eip.html>   says - 
> "CommandKey - Used to identify the hystrix command. This option cannot be 
> configured but is locked down to be the node id to make the command unique." 
> 
> It's just hard to believe that people will actually use hystrix stat without 
> a meaningful name, so I was thinking maybe I'm missing something. Or is it a 
> feature request? 
> 
> Thank you in advance 
> 
> 
> 
> -- 
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-and-Hystrix-Command-Name-tp5788614.html
> Sent from the Camel - Users mailing list archive at Nabble.com. 




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

If you reply to this email, your message will be added to the discussion below:

http://camel.465427.n5.nabble.com/Apache-Camel-and-Hystrix-Command-Name-tp5788614p5788616.html
 

To unsubscribe from Apache Camel and Hystrix Command Name, click here.
NAML 





--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-and-Hystrix-Command-Name-tp5788614p5788617.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Apache Camel and Hystrix Command Name

2016-10-11 Thread Claus Ibsen
Hi

I think we made it use the node id as the command name. So you can try
doing hystrix().id("myNameHere") 


On Tue, Oct 11, 2016 at 6:19 PM, ValeryN  wrote:
> I'm really happy to see hystrix support though DSL in a latest Apache Camel
> version 2.18.0. My question is - how does one name a hystrix command now?
>
> Let's say if I write -
>
> from("direct:start").hystrix().to("log:out")
> Hystrix dashboard will register "hystrix1" command and show stat for it,
> that's the point I wanna change.
>
> Hystrix's  EIP doc    says -
> "CommandKey - Used to identify the hystrix command. This option cannot be
> configured but is locked down to be the node id to make the command unique."
>
> It's just hard to believe that people will actually use hystrix stat without
> a meaningful name, so I was thinking maybe I'm missing something. Or is it a
> feature request?
>
> Thank you in advance
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-and-Hystrix-Command-Name-tp5788614.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


RE: Apache Camel + Microsoft Azure Service Bus

2016-06-22 Thread Steve Huston
Azure supports AMQP, you should be able to use the JMS component in Camel.

I think MS has learned that locking people onto one choice is not a good idea, 
particularly with developers.

> -Original Message-
> From: jamie3 [mailto:jam...@gmail.com]
> Sent: Wednesday, June 22, 2016 10:29 AM
> To: users@camel.apache.org
> Subject: Apache Camel + Microsoft Azure Service Bus
> 
> I am wondering if there is a component for Azure Service Bus. IIRC service
> bus supports AMQP but I am wondering if there is a native component?
> 
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Apache-
> Camel-Microsoft-Azure-Service-Bus-tp5784320.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel + Microsoft Azure Service Bus

2016-06-22 Thread Andrea Cosentino
As far as I know there are no component related to Azure.

:-)
 --
Andrea Cosentino 
--
Apache Camel PMC Member
Apache Karaf Committer
Apache Servicemix Committer
Email: ancosen1...@yahoo.com
Twitter: @oscerd2
Github: oscerd



On Wednesday, June 22, 2016 4:51 PM, jamie3  wrote:
I am wondering if there is a component for Azure Service Bus. IIRC service
bus supports AMQP but I am wondering if there is a native component?





--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-Microsoft-Azure-Service-Bus-tp5784320.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel connect but does not download files from external FTP

2016-05-25 Thread GuilhermeRN
I succeded yesterday to make it work. The problem was the passive mode Claus
quoted.
Actually, I had tried it before but camel was complaining about the sintax
of it and I moved on to try other things.
In the FAQ :
http://camel.apache.org/why-does-ftp-component-not-download-any-files.html
the parameter is misspelled. There, we have "passiveMove" rather than
"passiveMode". Toke a little time to find another source of the parameter.

Anyways, thank you so much for the support and congratulations for the
framework.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-connect-but-does-not-download-files-from-external-FTP-tp5783051p5783071.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel connect but does not download files from external FTP

2016-05-25 Thread Claus Ibsen
Yeah

And also mind about passive and active mode
http://stackoverflow.com/questions/1699145/what-is-the-difference-between-active-and-passive-ftp

On Wed, May 25, 2016 at 9:00 AM, souciance
 wrote:
> Can you download the file manually via FTP from the ec2 machine? Just so
> you verify that it actually works from that particular host.
>
> On Wed, May 25, 2016 at 3:18 AM, GuilhermeRN [via Camel] <
> ml-node+s465427n5783051...@n5.nabble.com> wrote:
>
>> Hi!
>>
>> I'm running a standalone camel route.
>> When I run my Main.class locally in (Eclipse->Run-As->Java Application) it
>> works fine. The file is consumed from the external FTP and all the route
>> works.
>>
>> However, when I am im my ec2 and do git-clone from my repository and
>> perform mvn package -> mvn exec:java of the same project it runs normally
>> but only ping the FTP endpoint, not downloading the file.
>>
>> I checked all the jars in my dependency-jars file(in my ec2) and they are
>> the same as in the Eclipse maven-dependencies(locally)
>>
>> my pom with the versions and etc looks like:
>>
>> 
>> http://maven.apache.org/POM/4.0.0; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance;
>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd;>
>>
>> 4.0.0
>>
>> myGroupId
>> myApp
>> 0.0.1-SNAPSHOT
>> jar
>> MyApp
>> myUrl
>>
>> 
>> UTF-8
>>
>> UTF-8
>>
>> 1.7.10
>> 1.2.17
>> 4.11
>> 2.15.2
>> 3.4
>> 1.2
>> 2.4
>> 2.6
>> 2.3.0
>> 0.6.2
>> 1.6.0
>> 
>>
>> 
>> 
>> release.fusesource.org
>> FuseSource Release Repository
>> 
>> http://repo.fusesource.com/nexus/content/repositories/releases
>> 
>> false
>> 
>> 
>> true
>> 
>> 
>> 
>> ea.fusesource.org
>> FuseSource Community Early Access Release
>> Repository
>> http://repo.fusesource.com/nexus/content/groups/ea
>> 
>> false
>> 
>> 
>> true
>> 
>> 
>> 
>>
>> 
>> 
>> release.fusesource.org
>> FuseSource Release Repository
>> 
>> http://repo.fusesource.com/nexus/content/repositories/releases
>> 
>> false
>> 
>> 
>> true
>> 
>> 
>> 
>> ea.fusesource.org
>> FuseSource Community Early Access Release
>> Repository
>> http://repo.fusesource.com/nexus/content/groups/ea
>> 
>> false
>> 
>> 
>> true
>> 
>> 
>> 
>>
>> 
>> 
>> com.atomikos
>> transactions-jta
>> 3.9.3
>> 
>>
>>
>>
>>
>>
>>
>> 
>> org.apache.camel
>> camel-core
>> ${camel.version}
>> 
>> 
>> org.apache.camel
>> camel-spring
>> ${camel.version}
>> 
>>
>> 
>> org.apache.camel
>> camel-ftp
>> ${camel.version}
>> 
>>
>>
>> 
>> org.apache.ftpserver
>> ftpserver-core
>> 1.0.6
>> 
>>
>>
>>
>> 
>> org.apache.camel
>> camel-bindy
>> ${camel.version}
>> 
>> 
>> org.apache.camel
>> camel-jaxb
>> ${camel.version}
>> 
>> 
>> org.apache.activemq
>> activemq-camel
>> 5.11.1
>> 
>>
>> 
>> org.apache.commons
>> commons-lang3
>> ${commons.lang3.version}
>> 
>>
>> 
>> joda-time
>> joda-time
>> ${joda.time.version}
>> 
>>
>> 
>> org.apache.camel
>> camel-test-spring
>> ${camel.version}
>> test
>> 
>>
>> 
>> org.apache.camel
>> camel-jms
>> ${camel.version}
>> 
>>
>> 
>> javax.servlet
>> javax.servlet-api
>> 4.0.0-b01
>> 
>>
>> 
>> org.apache.derby
>> derby
>> 10.10.1.1
>> 
>>
>> 
>> org.postgresql
>> postgresql
>> 9.3-1103-jdbc41
>> 
>>
>>  
>> org.springframework
>> spring-orm
>> 4.1.6.RELEASE
>>  
>>
>>  
>> org.springframework
>> spring-jdbc
>> 4.1.6.RELEASE
>> 
>>
>> 
>> org.hibernate
>> 

Re: Apache Camel connect but does not download files from external FTP

2016-05-25 Thread souciance
Can you download the file manually via FTP from the ec2 machine? Just so
you verify that it actually works from that particular host.

On Wed, May 25, 2016 at 3:18 AM, GuilhermeRN [via Camel] <
ml-node+s465427n5783051...@n5.nabble.com> wrote:

> Hi!
>
> I'm running a standalone camel route.
> When I run my Main.class locally in (Eclipse->Run-As->Java Application) it
> works fine. The file is consumed from the external FTP and all the route
> works.
>
> However, when I am im my ec2 and do git-clone from my repository and
> perform mvn package -> mvn exec:java of the same project it runs normally
> but only ping the FTP endpoint, not downloading the file.
>
> I checked all the jars in my dependency-jars file(in my ec2) and they are
> the same as in the Eclipse maven-dependencies(locally)
>
> my pom with the versions and etc looks like:
>
> 
> http://maven.apache.org/POM/4.0.0; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd;>
>
> 4.0.0
>
> myGroupId
> myApp
> 0.0.1-SNAPSHOT
> jar
> MyApp
> myUrl
>
> 
> UTF-8
>
> UTF-8
>
> 1.7.10
> 1.2.17
> 4.11
> 2.15.2
> 3.4
> 1.2
> 2.4
> 2.6
> 2.3.0
> 0.6.2
> 1.6.0
> 
>
> 
> 
> release.fusesource.org
> FuseSource Release Repository
> 
> http://repo.fusesource.com/nexus/content/repositories/releases
> 
> false
> 
> 
> true
> 
> 
> 
> ea.fusesource.org
> FuseSource Community Early Access Release
> Repository
> http://repo.fusesource.com/nexus/content/groups/ea
> 
> false
> 
> 
> true
> 
> 
> 
>
> 
> 
> release.fusesource.org
> FuseSource Release Repository
> 
> http://repo.fusesource.com/nexus/content/repositories/releases
> 
> false
> 
> 
> true
> 
> 
> 
> ea.fusesource.org
> FuseSource Community Early Access Release
> Repository
> http://repo.fusesource.com/nexus/content/groups/ea
> 
> false
> 
> 
> true
> 
> 
> 
>
> 
> 
> com.atomikos
> transactions-jta
> 3.9.3
> 
>
>
>
>
>
>
> 
> org.apache.camel
> camel-core
> ${camel.version}
> 
> 
> org.apache.camel
> camel-spring
> ${camel.version}
> 
>
> 
> org.apache.camel
> camel-ftp
> ${camel.version}
> 
>
>
> 
> org.apache.ftpserver
> ftpserver-core
> 1.0.6
> 
>
>
>
> 
> org.apache.camel
> camel-bindy
> ${camel.version}
> 
> 
> org.apache.camel
> camel-jaxb
> ${camel.version}
> 
> 
> org.apache.activemq
> activemq-camel
> 5.11.1
> 
>
> 
> org.apache.commons
> commons-lang3
> ${commons.lang3.version}
> 
>
> 
> joda-time
> joda-time
> ${joda.time.version}
> 
>
> 
> org.apache.camel
> camel-test-spring
> ${camel.version}
> test
> 
>
> 
> org.apache.camel
> camel-jms
> ${camel.version}
> 
>
> 
> javax.servlet
> javax.servlet-api
> 4.0.0-b01
> 
>
> 
> org.apache.derby
> derby
> 10.10.1.1
> 
>
> 
> org.postgresql
> postgresql
> 9.3-1103-jdbc41
> 
>
>  
> org.springframework
> spring-orm
> 4.1.6.RELEASE
>  
>
>  
> org.springframework
> spring-jdbc
> 4.1.6.RELEASE
> 
>
> 
> org.hibernate
> hibernate-core
> 4.2.15.Final
> 
>
> 
> com.fasterxml.jackson.core
> jackson-core
> ${jackson.version}
> 
>
> 
> org.apache.httpcomponents
> httpclient
> 4.5.1
> 
>
>
>
>
> 
>   org.slf4j
>   slf4j-api
>   1.7.5
> 
> 
>   org.slf4j
>   slf4j-log4j12
>   1.7.5
> 

Re: Apache Camel RedHat Slidedeck?

2016-04-20 Thread jamie3
Thank you very much.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-RedHat-Slidedeck-tp5781433p5781441.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel RedHat Slidedeck?

2016-04-20 Thread Claus Ibsen
Hi Jamie

I just pushed the slides to my slideshare at
http://www.slideshare.net/davsclaus/developing-microservices-with-apache-camel






On Wed, Apr 20, 2016 at 5:04 PM, jamie3  wrote:
> Hi everyone,
>
> I am wondering if it is possible to get a copy of the slidedeck from this
> presentation.
>
> https://www.youtube.com/watch?v=91UiQgazt3g
>
> Currently I work for a large company who uses expensive proprietary
> integration solutions. My goal is to showcase open source alternatives to
> the expensive vendors.
>
> Kind regards.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-RedHat-Slidedeck-tp5781433.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Apache Camel bean parameter binding issue with Spring DSL

2016-04-15 Thread Claus Ibsen
Hi

Thanks I logged a ticket
https://issues.apache.org/jira/browse/CAMEL-9870

On Thu, Apr 14, 2016 at 10:00 PM, Mario Balaban  wrote:
> I am using version 2.16.1. The example is something like this:
>
>  
>
> and the the java bean method is:
>
> public void addNote(String invoice, String note){
> ...}
>
> In this case the binding expression assigns the result of Invoice.toString
> method to the first argument and null to the second even if there is a
> header with name "note" that does contain a non null value.
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-bean-parameter-binding-issue-with-Spring-DSL-tp5772200p5781114.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Apache Camel bean parameter binding issue with Spring DSL

2016-04-14 Thread Mario Balaban
I am using version 2.16.1. The example is something like this: 

 

and the the java bean method is: 

public void addNote(String invoice, String note){
...}

In this case the binding expression assigns the result of Invoice.toString
method to the first argument and null to the second even if there is a
header with name "note" that does contain a non null value.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-bean-parameter-binding-issue-with-Spring-DSL-tp5772200p5781114.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel bean parameter binding issue with Spring DSL

2016-04-14 Thread Claus Ibsen
On Thu, Apr 14, 2016 at 10:23 AM, Mario Balaban  wrote:
> Hello, I also have been passing a couple of hours trying to debug a missing
> parenthesis from a bean binding expression. It would be nice if the parser
> threw an exception in case of missing close parenthesis. Thanks!
>

What Camel version did you use?
And can you show the example?




>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-bean-parameter-binding-issue-with-Spring-DSL-tp5772200p5781069.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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


Re: Apache Camel bean parameter binding issue with Spring DSL

2016-04-14 Thread Mario Balaban
Hello, I also have been passing a couple of hours trying to debug a missing
parenthesis from a bean binding expression. It would be nice if the parser
threw an exception in case of missing close parenthesis. Thanks!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-bean-parameter-binding-issue-with-Spring-DSL-tp5772200p5781069.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Apache camel mime-multipart usage and examples?

2016-04-08 Thread Siano, Stephan
Hi,

Have you tried PAYLOAD mode?

I don't know which JBOSS FUSE version will contain Camel 2.17 (that one is 
pretty new). Anyway, I noticed yesterday that there is a bug in the 2.17.0 
MIME-Multipart decoder that will prevent your multipart from being processed 
(because the attachment doesn't have a filename). I am just in the process of 
fixing that bug...

Best regards
Stephan

-Original Message-
From: ekta.v.wadhw...@accenture.com [mailto:ekta.v.wadhw...@accenture.com] 
Sent: Freitag, 8. April 2016 09:58
To: users@camel.apache.org; d...@camel.apache.org
Subject: Re: Apache camel mime-multipart usage and examples?


Stephan,


I am using JBOSS FUSE version  8.1.0.GA which supports maximum camel core 
version : 2.15.0.

So i would not be able to use 2.17.0.

To your point on CXF-endpoint, yes i am using CXF endpoint to invoke a 
webservice which provides SOAP response with attachments. However using Spring 
XML-DSL I can only invoke webservice using dataFormat as Message. My 
configuration looks like below:

https://fin-aufsn4x0cba.oracleoutsourcing.com:443/publicFinancialCommonErpIntegration/ErpIntegrationService;<https://fin-aufsn4x0cba.oracleoutsourcing.com/publicFinancialCommonErpIntegration/ErpIntegrationService%22>
wsdlURL="src/main/resources/ERP1.wsdl"
serviceClass="com.oracle.xmlns.apps.financials.commonmodules.shared.model.erpintegrationservice.ErpIntegrationService"
xmlns:ssp="http://xmlns.oracle.com/oxp/service/v2;><http://xmlns.oracle.com/oxp/service/v2%22%3E>






(1) dataFormat=Message:-  doesnot provides raw response and DOESNOT 
understand/automatically process the SOAPEnvelopeResponse + Attachments. hence 
i have to process it manually somehow. 1 option i found is using 
mime-multiparts dataformat. but couldnt try ttest because jboss fuse isnt 
supporting camel 2.17.0

(2) dataFormat=CXF_MEssage:- This DOES automatic parsing of 
SOAPEnvelopeREsponse + Attachments.

However i couldnt even get the response from webservice using this dataFormat.  
I ended up with following error using CXF_MEssage:


CXF configuration:
https://fin-aufsn4x0cba.oracleoutsourcing.com:443/publicFinancialCommonErpIntegration/ErpIntegrationService;<https://fin-aufsn4x0cba.oracleoutsourcing.com/publicFinancialCommonErpIntegration/ErpIntegrationService%22>
wsdlURL="src/main/resources/ERP1.wsdl"
serviceClass="com.oracle.xmlns.apps.financials.commonmodules.shared.model.erpintegrationservice.ErpIntegrationService"
xmlns:ssp="http://xmlns.oracle.com/oxp/service/v2;><http://xmlns.oracle.com/oxp/service/v2%22%3E>





Error with CXF_MESSAGE:
In this above confguration if i change dataformat from Message to CXF_MESSAGE, 
i am getting below error:
default-workqueue-1] PhaseInterceptorChain  WARN  Interceptor for 
{http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/}ErpIntegrationServiceService#{http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/}uploadFileToUcm
 has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary: 
--=_Part_3434_428158164.1459969427807
at 
org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:60)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:784)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1644)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1155)
at 
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at 
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
at java.lang.Thread.run(Thread.java:745)



Possible reason that i suspect is:

The webservice responds in MULTIPARTS(SOAPENvelope in 1 part + Attachments in 
2nd part) for which i may have to configure serviceInterfaceStrategy as 
specified in this link: http://camel.apache.org/soap.html

Again for this there is no online help/guide how to configure 
serviceInterfaceStrategy. hence i cudnt succeed here as well.


I suspect, Had my webservice responded in plain xml with no Multipart content, 
CXF_MEssage wud hv worked without the above error.

Problem here is with Multiparts. hence i chose to use raw option(i.e, 
dataformat=Message).

(3) What next?

-> Can you help with the proper complete example of

- Configuring serviceInterfaceStrategy?

- OR processing Manually the Multiparts response using some apache camel 
component?

- OR do u know

Re: Apache camel mime-multipart usage and examples?

2016-04-08 Thread ekta.v.wadhwani

Stephan,


I am using JBOSS FUSE version  8.1.0.GA which supports maximum camel core 
version : 2.15.0.

So i would not be able to use 2.17.0.

To your point on CXF-endpoint, yes i am using CXF endpoint to invoke a 
webservice which provides SOAP response with attachments. However using Spring 
XML-DSL I can only invoke webservice using dataFormat as Message. My 
configuration looks like below:

https://fin-aufsn4x0cba.oracleoutsourcing.com:443/publicFinancialCommonErpIntegration/ErpIntegrationService;
wsdlURL="src/main/resources/ERP1.wsdl"
serviceClass="com.oracle.xmlns.apps.financials.commonmodules.shared.model.erpintegrationservice.ErpIntegrationService"
xmlns:ssp="http://xmlns.oracle.com/oxp/service/v2;>






(1) dataFormat=Message:-  doesnot provides raw response and DOESNOT 
understand/automatically process the SOAPEnvelopeResponse + Attachments. hence 
i have to process it manually somehow. 1 option i found is using 
mime-multiparts dataformat. but couldnt try ttest because jboss fuse isnt 
supporting camel 2.17.0

(2) dataFormat=CXF_MEssage:- This DOES automatic parsing of 
SOAPEnvelopeREsponse + Attachments.

However i couldnt even get the response from webservice using this dataFormat.  
I ended up with following error using CXF_MEssage:


CXF configuration:
https://fin-aufsn4x0cba.oracleoutsourcing.com:443/publicFinancialCommonErpIntegration/ErpIntegrationService;
wsdlURL="src/main/resources/ERP1.wsdl"
serviceClass="com.oracle.xmlns.apps.financials.commonmodules.shared.model.erpintegrationservice.ErpIntegrationService"
xmlns:ssp="http://xmlns.oracle.com/oxp/service/v2;>





Error with CXF_MESSAGE:
In this above confguration if i change dataformat from Message to CXF_MESSAGE, 
i am getting below error:
default-workqueue-1] PhaseInterceptorChain  WARN  Interceptor for 
{http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/}ErpIntegrationServiceService#{http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/}uploadFileToUcm
 has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary: 
--=_Part_3434_428158164.1459969427807
at 
org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:60)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:784)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1644)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1155)
at 
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at 
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
at java.lang.Thread.run(Thread.java:745)



Possible reason that i suspect is:

The webservice responds in MULTIPARTS(SOAPENvelope in 1 part + Attachments in 
2nd part) for which i may have to configure serviceInterfaceStrategy as 
specified in this link: http://camel.apache.org/soap.html

Again for this there is no online help/guide how to configure 
serviceInterfaceStrategy. hence i cudnt succeed here as well.


I suspect, Had my webservice responded in plain xml with no Multipart content, 
CXF_MEssage wud hv worked without the above error.

Problem here is with Multiparts. hence i chose to use raw option(i.e, 
dataformat=Message).

(3) What next?

-> Can you help with the proper complete example of

- Configuring serviceInterfaceStrategy?

- OR processing Manually the Multiparts response using some apache camel 
component?

- OR do u know if some version of jboss fuse supports camel core of 2.17.0 so 
that i can install that and try use mime-multipart

- OR anything else that u think could help me with a simple requirement: 
Processing SOAP Multiparts response using APache CXF or any other APAche camel 
components


Thanks in advance.

Ekta

-Original Message-

Hi,

Which camel version are you using? MIME-Multipart is only available starting
Camel 2.17.0.

I am not 100% sure, but your response looks somewhat like SOAP with attachments
or MTOM. If you are using some kind of Camel-CXF endpoint for receiving it, the
endpoint might parse it for you.

Best regards
Stephan

-Original Message-




From: Wadhwani, 

RE: Apache camel mime-multipart usage and examples?

2016-04-07 Thread Siano, Stephan
Hi,

Which camel version are you using? MIME-Multipart is only available starting 
Camel 2.17.0.

I am not 100% sure, but your response looks somewhat like SOAP with attachments 
or MTOM. If you are using some kind of Camel-CXF endpoint for receiving it, the 
endpoint might parse it for you.

Best regards
Stephan

-Original Message-
From: ekta.v.wadhw...@accenture.com [mailto:ekta.v.wadhw...@accenture.com] 
Sent: Donnerstag, 7. April 2016 19:18
To: users@camel.apache.org; d...@camel.apache.org
Subject: Apache camel mime-multipart usage and examples?

Hi Team,

Jboss Fuse Studio : Version: 8.1.0.GA
Jdk version: 1.8.0_73
Using XML DSL

Scenario:
Webservice SOAP response is received in multiparts as below:
response : --=_Part_4706_434840889.1459343688908
Content-Type: application/xop+xml;charset=UTF-8;type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: 


http://schemas.xmlsoap.org/soap/envelope/;
xmlns:wsa="http://www.w3.org/2005/08/addressing;>
http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService//ErpIntegrationService/downloadESSJobExecutionDetailsResponseurn:uuid:82d7d264-ef7f-41da-8d51-79e940413b13http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/;>http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/;
xmlns:ns1="http://xmlns.oracle.com/adf/svc/types/; xmlns:ns0="
http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:type="ns0:DocumentDetails">http://www.w3.org/2004/08/xop/include;
href="cid:51e0b71c-160b-4921-a8a7-8fe7f87ccc3b"/>zipESS_L_157463G4S.Integration.UserAttachments157463.zip
--=_Part_4706_434840889.1459343688908
Content-Transfer-Encoding: binary
Content-ID: <51e0b71c-160b-4921-a8a7-8fe7f87ccc3b>

PK157463.log?XKS?8??W??jTL?  .. blah blah some binary content
--=_Part_4706_434840889.1459343688908--


Can i use apache camel mime-multipart to process this soap response
http://camel.apache.org/mime-multipart.html

As mentioned in this document, i have included the dependency. however i am not 
able to declare this dataFormat in  element.
Can you please help guide with some example using" XML DSL" ? There is no 
example available online.


Thanks,

Ekta



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise confidential information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the e-mail by you is prohibited. Where allowed by local law, electronic 
communications with Accenture and its affiliates, including e-mail and instant 
messaging (including content), may be scanned by our systems for the purposes 
of information security and assessment of internal compliance with Accenture 
policy.
__

www.accenture.com


Re: Apache camel. InterceptSendTo doesn't work with bean endpoint

2016-03-25 Thread aturkin
Hello. thank you for your reply!

I tried to use CamelSpringTestSupport and it works. My working example:
public class TestTest extends  CamelSpringTestSupport {
@Override
protected AbstractApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext("test-camel.xml");
}
@Override
public boolean isUseAdviceWith(){ return true; }
@Test
public void test() throws Exception{ ...context.start();  } 
}

But I'd like to use annotation. I have found example:

https://github.com/CamelCookbook/camel-cookbook-examples/blob/master/camel-cookbook-testing/src/test/java/org/camelcookbook/examples/testing/advicewith/FixedEndpointEnhancedSpringTest.java
 

I tried to use it in my case but my test didn't passed again:
@RunWith(CamelSpringJUnit4ClassRunner.class)
@ContextConfiguration({"classpath:test-camel.xml"})
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
@UseAdviceWith(true)
public class TestTest2  {   
@EndpointInject(ref="requestEP")
ProducerTemplate requestEP;
@EndpointInject(ref="beanEP")
ProducerTemplate beanEP; 
@Autowired
ModelCamelContext context; 
@Test
public void test() throws Exception{

context.getRouteDefinition("testRoute").adviceWith( context , new
AdviceWithRouteBuilder(){
@Override
public void configure() throws Exception {
interceptSendToEndpoint(
beanEP.getDefaultEndpoint().getEndpointUri() ).
to("mock:send").
skipSendToOriginalEndpoint();
}
});
context.start();
TestUtils.waitingFor("Configuration applied", 2000);
MockEndpoint mockEP =
context.getEndpoint("mock:send",MockEndpoint.class);
mockEP.setExpectedCount( 1 );
   
context.createProducerTemplate().sendBody(requestEP.getDefaultEndpoint(),
"Message");
mockEP.assertIsSatisfied();
TestUtils.waitingFor("All rows commited", 2000);
}
}
And I have detected that if I comment string "context.start();" in my first
example I get "Exception" that there are no consumers, but if I comment this
string in my second example, I don't get the same error.
As I understand http://camel.apache.org/spring-testing.html In case using
@UseAdviceWith(true) CamelContexts don't start automatically. What is wrong
and how to make test with annotation corrected?

Thanks,
Andrew





--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-camel-InterceptSendTo-doesn-t-work-with-bean-endpoint-tp5779474p5779704.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache camel. InterceptSendTo doesn't work with bean endpoint

2016-03-23 Thread Quinn Stevenson
Have you tried overriding isUseAdviceWith in your test?  It’s mentioned in the 
docs http://camel.apache.org/advicewith.html 



> On Mar 22, 2016, at 5:14 AM, aturkin  wrote:
> 
> I can't understand why my tests don't work. I try intercept and skip sending
> to endpoint which is bean reference and nothing happens. I'm using version
> 2.16.2.
> 
> test-camel.xml
> 
> 
> http://camel.apache.org/schema/spring;>  
>
>
>
>
>
>
> 
> EndpointBean.java
> 
> package com.rencap.emf.bpipe;
> 
> import org.slf4j.Logger;
> import org.slf4j.LoggerFactory;
> 
> public class EndpointBean {
>private static Logger LOG = LoggerFactory.getLogger(EndpointBean.class);
> 
>public void processMessage( String msg ){
>LOG.info("Processing message: {} ",msg);
>}
> }
> Unit test:
> 
> @EndpointInject(ref="requestEP")
> ProducerTemplate requestEP;
> @EndpointInject(ref="beanEP")
> ProducerTemplate beanEP;
> @Autowired
> ModelCamelContext camelContext; 
> @Test
> public void test() throws Exception{
> 
>camelContext.getRouteDefinition("testRoute").adviceWith( camelContext ,
> new AdviceWithRouteBuilder(){
>@Override
>public void configure() throws Exception {
>interceptSendToEndpoint(
> beanEP.getDefaultEndpoint().getEndpointUri() ).
>to("mock:send").
>skipSendToOriginalEndpoint();
>}
>}); 
>TestUtils.waitingFor("Configuration applied", 2000);
> 
>MockEndpoint mockEP =
> camelContext.getEndpoint("mock:send",MockEndpoint.class);
>mockEP.setExpectedCount( 1 );
> 
>requestEP.sendBody("Message");
> 
>mockEP.assertIsSatisfied();
> 
>TestUtils.waitingFor("All rows commited", 2000);
> }
> Test always fails. Logs:
> 
> 13:11:02.512 [main] INFO  o.apache.camel.model.RouteDefinition - AdviceWith
> route after: Route(testRoute)[[From[ref:requestEP]] ->
> [InterceptSendToEndpoint[bean://eb?method=processMessage ->
> [To[mock:send]]], To[ref:beanEP]]]
> 13:11:02.537 [main] INFO  o.a.camel.spring.SpringCamelContext - Route:
> testRoute started and consuming from: Endpoint[direct://request]
> 13:11:02.538 [main] INFO  com.rencap.emf.bpipe.test.TestUtils - Wait 2000
> ms. Configuration applied 
> 13:11:04.554 [main] INFO  com.rencap.emf.bpipe.EndpointBean - Processing
> message: Message 
> 13:11:04.556 [main] INFO  o.a.c.component.mock.MockEndpoint - Asserting:
> Endpoint[mock://send] is satisfied
> It means that sending to endpoint isn't being intercepted and skipped. May
> be I don't understand something but I coudn't find any restriction on use
> this method.
> 
> In additional I noticed the same problem for endpoint with log. If I replace
> beanEP on :
> 
> 
> that I receive the same result. But if I replace it on
> 
> 
> and add new route :
> 
> 
>
>
>
> that I will get expected result and test will be successed.
> 
> What do I do wrong? Or maybe Are there some restrictions on this method?
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-camel-InterceptSendTo-doesn-t-work-with-bean-endpoint-tp5779474.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Apache Camel EIP to process batch of messages identifying those which can be filtered

2016-02-29 Thread Quinn Stevenson
How about a simple splitter that removes the duplicates?  For example, a route 
like this
http://camel.apache.org/schema/spring;>





${body}






Could use a Splitter like this
public class RemoveDuplicateSplitterStrategry implements AggregationStrategy{
@Override
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
Logger log = LoggerFactory.getLogger(this.getClass());

if ( null == oldExchange ) {
Map messageList = new HashMap<>();
messageList.put( newExchange.getIn().getHeader("MY_KEY", 
String.class), newExchange.getIn().getBody(String.class) );
newExchange.getIn().setBody( messageList);
return newExchange;
}

Map messageList = oldExchange.getIn().getBody( 
Map.class) ;
String key = newExchange.getIn().getHeader("MY_KEY", String.class);
if (messageList.containsKey(key)) {
String value = messageList.remove(key);
log.warn( "Removing duplicate for {}: {}", key, value);
} else {
messageList.put(key, newExchange.getIn().getBody(String.class) );
}

return oldExchange;
}
}

> On Feb 18, 2016, at 10:17 AM, gilboy  wrote:
> 
> Thanks for the quick feedback. 
> 
> If I use the Idempotent Consumer EIP this would mean that the 2nd order
> (Order cancel) will be filtered out. However, I would want the new order to
> be filtered also. However, that would be sent to the counterparty with the
> Idempotent Consumer EIP
> 
> Regards
> Joe
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-EIP-to-process-batch-of-messages-identifying-those-which-can-be-filtered-tp5777844p5777868.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Apache Camel EIP to process batch of messages identifying those which can be filtered

2016-02-18 Thread gilboy
Thanks for the quick feedback. 

If I use the Idempotent Consumer EIP this would mean that the 2nd order
(Order cancel) will be filtered out. However, I would want the new order to
be filtered also. However, that would be sent to the counterparty with the
Idempotent Consumer EIP

Regards
Joe



--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-EIP-to-process-batch-of-messages-identifying-those-which-can-be-filtered-tp5777844p5777868.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache Camel EIP to process batch of messages identifying those which can be filtered

2016-02-18 Thread Quinn Stevenson
Sounds like a good use case for the Idempotent Consumer EIP 
http://camel.apache.org/idempotent-consumer.html 




> On Feb 18, 2016, at 7:06 AM, gilboy  wrote:
> 
> Hi
> 
> My route calls a DB procedure which returns a large number of order objects. 
> 
> Before I send out the orders to a counterparty I want to examine the list of
> orders and see if the same order ID appears as both a new order and a cancel
> order, e.g. order 1001 returned as a new order and order 1001 returned as a
> cancel order. If I find any instances of the above I want to remove the
> order, i.e. not send 1001 out to counterparty.
> 
> I looked at using the aggregator EIP but don't think its a great fit. Just
> wondering if there is another more suitable EIP that fits this use case
> 
> Thanks
> Joe
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-EIP-to-process-batch-of-messages-identifying-those-which-can-be-filtered-tp5777844.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



  1   2   3   4   >