Re: Camel & NiFi

2020-05-26 Thread FabryProg
Camel and NiFi.. 😍

I used both in enterprise projects.

For common people both framework could be similar BUT there is a big
difference.

Resiliency level!

NiFi saves every message to disk to reach high consistency level.

In apache camel message are fast, light but volatile.

I forward a question to you. how to create the same resiliency level in
camel? How to save (and resume) the flow every restart?

Kind regards !!!

Fabrizio

Il Mar 26 Mag 2020, 20:32 Claus Ibsen  ha scritto:

> Hi Raymond
>
> Thanks for sharing this with the Camel community.
>
> I am adding a link to the blog from our articles web page
>
> On Tue, May 26, 2020 at 8:14 AM ski n  wrote:
> >
> > Wrote a tech blog on using Camel with Apache NiFi:
> >
> >
> https://medium.com/@raymondmeester/using-camel-and-nifi-in-one-solution-c7668fafe451
> >
> > I thought I share it here,
> >
> > Raymond
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: Camel & NiFi

2020-05-26 Thread FabryProg
Thanks.

I'll implements a mock example soon as possible.

Have a good day!

Fabrizio

Il Mer 27 Mag 2020, 06:13 Jean-Baptiste Onofre  ha scritto:

> Hi,
>
> You can use ActiveMQ with persistent message between routes, it creates
> kind of resilience.
> It’s what I’m doing with most of my users/projects. It allows to resume
> and persist.
>
> Regards
> JB
>
> > Le 26 mai 2020 Ă  20:54, FabryProg  a Ă©crit :
> >
> > Camel and NiFi.. 😍
> >
> > I used both in enterprise projects.
> >
> > For common people both framework could be similar BUT there is a big
> > difference.
> >
> > Resiliency level!
> >
> > NiFi saves every message to disk to reach high consistency level.
> >
> > In apache camel message are fast, light but volatile.
> >
> > I forward a question to you. how to create the same resiliency level
> in
> > camel? How to save (and resume) the flow every restart?
> >
> > Kind regards !!!
> >
> > Fabrizio
> >
> > Il Mar 26 Mag 2020, 20:32 Claus Ibsen  ha
> scritto:
> >
> >> Hi Raymond
> >>
> >> Thanks for sharing this with the Camel community.
> >>
> >> I am adding a link to the blog from our articles web page
> >>
> >> On Tue, May 26, 2020 at 8:14 AM ski n  wrote:
> >>>
> >>> Wrote a tech blog on using Camel with Apache NiFi:
> >>>
> >>>
> >>
> https://medium.com/@raymondmeester/using-camel-and-nifi-in-one-solution-c7668fafe451
> >>>
> >>> I thought I share it here,
> >>>
> >>> Raymond
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -
> >> http://davsclaus.com @davsclaus
> >> Camel in Action 2: https://www.manning.com/ibsen2
> >>
>
>


Re: Passwords in Camel endpoint URIs and limitations of RAW syntax

2020-06-04 Thread FabryProg
Hello Florian,

Did you try to save the password into a variable / parameter / config file
and lookup it into the URI?

Kind regards!

Il giorno gio 4 giu 2020 alle ore 10:50 Florian Patzl <
florian.pa...@evolit.com> ha scritto:

> Hello Ralf,
> thanks for your response. No, I didn't mention that in my description. :-)
> URL encoding would be my preferred solution, too, but unfortunately that
> does not seem to prevent the problems with passwords containing ")&".
> Unless something about my encoding is wrong.
>
> For example, given a password "pwd)&a=b", both with and without RAW(...)
> the result is wrong:
>
> TRACE o.a.c.i.engine.AbstractCamelContext - Getting endpoint with raw uri:
> pop3://localhost:3110/?username=test2&password=RAW%28pwd%29%26a%3Db%29,
> normalized uri:
> pop3://localhost:3110/?a=b%29&password=RAW(pwd)&username=test2
>
> TRACE o.a.c.i.engine.AbstractCamelContext - Getting endpoint with raw uri:
> pop3://localhost:3110/?username=test2&password=pwd%29%26a%3Db, normalized
> uri: pop3://localhost:3110/?a=b&password=pwd%29&username=test2
>
> I'm currently testing on 3.3.0.
>
> Best Regards,
> Florian
> 
> From: Claussnitzer, Ralf 
> Sent: Thursday, June 4, 2020 08:13
> To: users@camel.apache.org 
> Subject: Re: Passwords in Camel endpoint URIs and limitations of RAW syntax
>
> Hi Florian,
>
> I may have missed the answer to my questions in your detailed problem
> description. But how is this not solved by URL-Encoding?
> There was once a bug with URL encodings in Camel. Does this bug still
> exist? What version of Camel are you using?
>
> -Ralf
> 
> From: Florian Patzl 
> Sent: Wednesday, June 3, 2020 2:49 PM
> To: users@camel.apache.org
> Subject: Passwords in Camel endpoint URIs and limitations of RAW syntax
>
> Hello,
> I'm trying to figure out the best way to handle passwords in Camel
> endpoint URIs in my application.
> I know the topic has been cause for Stack Overflow posts, JIRA entries and
> mails but I'm still not sure I've got everything right.
> Sorry for the big wall of text, but I think I should explain what exactly
> I've tried and found out on the topic.
>
> The main problem is that the reserved URI characters '+' and '&' (plus and
> ampersand) cause parsing problems in Camel endpoint URIs.
> '+' is replaced by a blank, and '&' is treated as the delimiter to the
> next parameter.
> An example URI for the password "pwd2+2":
> pop3://localhost:3110/?username=test2&password=pwd2%2B2
>
> A relevant post is here:
>
> https://stackoverflow.com/questions/11018987/camel-how-to-include-an-ampersand-as-data-in-a-uri-not-as-a-delimiter/34926623#34926623
>
>
> Now, the solution in documentation is using the RAW(...) syntax:
>
> https://camel.apache.org/manual/latest/faq/how-do-i-configure-endpoints.html#HowdoIconfigureendpoints-Configuringparametervaluesusingrawvalues
> So for example:
> pop3://localhost:3110/?username=test2&password=RAW(pwd2+2)
>
> Using that feature means we can no longer treat Camel URIs as pure URIs in
> our application, because the '+' of the password must not be escaped for
> this to work.
> But if there's no way around that, we can deal with that.
>
> However, when trying the limits of the RAW(...) syntax, we noticed that it
> can not parse passwords that contain ')&'.
> This was covered in the following JIRA issue, and since then there is
> support for an alternative syntax using curly braces: RAW{...}, that I
> didn't find in documentation:
> https://issues.apache.org/jira/browse/CAMEL-12982
> The last comment provides a pretty detailed summary of the options and
> limits.
>
>
> The alternative RAW{...} syntax works fine, except for a minor flaw: It
> breaks URI sanitizing.
> For example, Camel leaks the '&2' portion of the password 'pwd2&2' in log
> entries like:
> pop3://localhost:3110/?password=xx&2%7D&username=test2
>
> The same problem existed for the RAW(...) syntax:
> https://issues.apache.org/jira/browse/CAMEL-11269
> So the fix should be rather simple, I will check whether there's already
> an issue for that and might even be able to submit a PR for that.
>
> But, more importantly: By checking the passwords for ')&' and '}&' and
> dynamically deciding the RAW syntax to use, we should be able to support
> any password *except* if they contain both ')&' and '}&'.
> That is a weird constraint for passwords, but should be justifiable as
> technical limitation.
>
>
> As an alternative to all of this, I sometimes saw the suggestion to
> configure the component with 'useRawUri':
>
>   *   In DefaultComponent, useRawUri() is hardcoded to false. That means
> for applying that to built-in components (e.g. Mail, FTP) we'd have to
> subclass the components to override the method?
>   *   Setting useRawUri on endpoint level does not seem to be supported:
> https://issues.apache.org/jira/browse/CAMEL-6230
> I tried that for the Mail component and got an error for unknown parameter
> useRawU

Spring Bean init vs Camel Context Running status

2018-09-28 Thread FabryProg
I have a problem with spring bean init and camel context (spring) running
status.

My software has a declared bean:



Inside the bean i write follow code:

public class BeanA  {
@EndpointInject(uri="seda://sendNotify")
private ProducerTemplate notifier;
..
   public void init() {
 notifier.requestBody("I love Apache camel");
   }
}
}

When i start my application context i have an error because apache camel
route *seda://sendNotify* isn't still deployed jet

Can i have a method to known when spring camel context is running out?

I suppose to use another spring bean and insert it into depends-on bean
attribute. Is it correct way to solve my problem?

Kings Regard

Fabrizio Spataro


Re: Spring Bean init vs Camel Context Running status

2018-09-28 Thread FabryProg
So i must remove init method, define an event (using spring) and handle it
from a route defined into camel context.

is it correct?

Il giorno ven 28 set 2018 alle ore 11:19 Luca Burgazzoli <
lburgazz...@gmail.com> ha scritto:

> Hi,
>
> you can define an EventNotifier bean to be informed about various
> events that happens in camel among which the startup of the context.
>
>
> ---
> Luca Burgazzoli
>
> On Fri, Sep 28, 2018 at 11:13 AM FabryProg  wrote:
> >
> > I have a problem with spring bean init and camel context (spring) running
> > status.
> >
> > My software has a declared bean:
> >
> >  init-method="init" />
> >
> > Inside the bean i write follow code:
> >
> > public class BeanA  {
> > @EndpointInject(uri="seda://sendNotify")
> > private ProducerTemplate notifier;
> > ..
> >public void init() {
> >  notifier.requestBody("I love Apache camel");
> >}
> > }
> > }
> >
> > When i start my application context i have an error because apache camel
> > route *seda://sendNotify* isn't still deployed jet
> >
> > Can i have a method to known when spring camel context is running out?
> >
> > I suppose to use another spring bean and insert it into depends-on bean
> > attribute. Is it correct way to solve my problem?
> >
> > Kings Regard
> >
> > Fabrizio Spataro
>


Re: spring boot http4 basic auth configuration

2018-10-10 Thread FabryProg
You shuold use authenticationPreemptive param

Il Mer 10 Ott 2018, 11:44 Mark Hayen  ha scritto:

> Hi,
>
> I'm trying to configure basic authenicatio for the http4 component by using
> the provided spring boot configuration properties.
>
> application.properties:
> camel.component.http4.http-configuration.auth-method=Basic
> camel.component.http4.http-configuration.auth-username=peppi
> camel.component.http4.http-configuration.auth-password=kokki
>
> According to the newest docs on Github these should be picked up by
> the autoconfiguration, and they are, but when comes to configuring
> the httpcomponent, the relevant part of the code cannot find the
> properties anymore.
>
> This happens in HttpComponent line 145 to 170.
>
> Do I need more/other properties being set?
>
> versions used:
> Spring Boot 2.0.4.RELEASE
> Camel 2.22.1
>
> Thank you
>
> Mark
>


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
>


Rest dynamic load bilancer

2018-11-28 Thread FabryProg
hello everybody

i have a rest service using rest DSL.

I would write / use a load bilancer based to system load to increase
consumer's thread.

The max number of threads are
Math.max(1, floor10(cpu * 8))

There are a dynamic load bilancer into  apache camel?


SynchronizedExchange: Exception occurred during onCompletion

2018-12-18 Thread FabryProg
Hello

Occasionally, we have a WARNING into our camel project.

We are using disruptor queue implementation

what should it be? Is it an error or warning message? is it dangerous?

we cannot reproduce it programmatically!

Thanks

2018-12-16 19:13:44,638 WARN
[org.apache.camel.component.disruptor.SynchronizedExchange] -  ()
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
at java.util.HashMap$EntryIterator.next(HashMap.java:1476)
at java.util.HashMap$EntryIterator.next(HashMap.java:1474)
at java.util.HashMap.putMapEntries(HashMap.java:512)
at java.util.HashMap.putAll(HashMap.java:785)
at
org.apache.camel.util.ExchangeHelper.copyResults(ExchangeHelper.java:379)
at
org.apache.camel.component.disruptor.SingleConsumerSynchronizedExchange.consumed(SingleConsumerSynchronizedExchange.java:33)
at
org.apache.camel.component.disruptor.DisruptorConsumer$2.onComplete(DisruptorConsumer.java:164)
at
org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:104)
at
org.apache.camel.component.disruptor.AbstractSynchronizedExchange.performSynchronization(AbstractSynchronizedExchange.java:55)
at
org.apache.camel.component.disruptor.SingleConsumerSynchronizedExchange.consumed(SingleConsumerSynchronizedExchange.java:35)
at
org.apache.camel.component.disruptor.DisruptorConsumer$2.onComplete(DisruptorConsumer.java:164)
at
org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:104)
at
org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:243)
at
org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:65)
at
org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:685)
at
org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:634)
at
org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:251)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:127)
at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at
org.apache.camel.component.disruptor.DisruptorConsumer.process(DisruptorConsumer.java:175)
at
org.apache.camel.component.disruptor.DisruptorConsumer.access$000(DisruptorConsumer.java:42)
at
org.apache.camel.component.disruptor.DisruptorConsumer$ConsumerEventHandler.onEvent(DisruptorConsumer.java:213)
at
org.apache.camel.component.disruptor.DisruptorConsumer$ConsumerEventHandler.onEvent(DisruptorConsumer.java:193)
at
com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:129)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)


Re: Poor Performance of Camel-Sql Batch insertions with Oracle DB

2019-05-23 Thread FabryProg
Hi guy

Perhaps the error is another:  do you tried to change initial and max pool
size ? Or connectionharvest settings?


King regards


Il Gio 23 Mag 2019, 23:12 Saiteja Parna  ha
scritto:

> This issue is resolved. My post might help others.
> Batch Update/Insert/Delete has issues with Oracle_Jdbc drivers 12c and
> above.
> If any one using Camel-sql or any other Camel database components with
> Oracle_jdbc drivers (12c and latest) will see very slow performance issue
> with batch insert/update/delete with very big records(like a record with 90
> columns).
> Oracle team used my test case(Spring JDBC with Oracle Driver) and confirmed
> the bug.
>
>
>
>
>
>
> On Mon, Apr 15, 2019 at 10:36 AM Saiteja Parna 
> wrote:
>
> > Hello,
> >
> > Batch update/insert are deprecated in the Oracle drivers 12c. Please
> Check
> > the description below.
> >
> > *Oracle*:
> > Oracle update batching was deprecated in Oracle Database 12c Release 1
> > (12.1). Starting in Oracle Database 12c Release 2 (12.2), Oracle update
> > batching is a no operation code (no-op). This means that if you implement
> > Oracle update batching in your application, using the Oracle Database 12c
> > Release 2 (12.2) JDBC driver, then the specified batch size is not set
> and
> > results in a batch size of 1. With this batch setting, your application
> > processes one row at a time. Oracle strongly recommends that you use the
> > standard JDBC batching if you are using the Oracle Database 12c Release 2
> > (12.2) JDBC driver.
> >
> >
> > *Question*: As per the above description, It is recommended to set Batch
> > Size. But i don't see BatchSize property for Camel-SQL document.
> > I tried *template.batchSize=500* on camel-sql endpoint but it didn't
> > work. Still it is taking 30 mins to insert 4000 records.
> >
> > If anyone wants to replicate the issue, i copied my blueprint in the
> above
> > email.
> >
> >
> >
> >
> > On Fri, Apr 12, 2019 at 4:04 PM sai [via Camel] <
> > ml+s465427n5833064...@n5.nabble.com> wrote:
> >
> >>  I have tested with old driver. I don't see any performance issues.
> >>
> >> I don't think it is environment issue, because i tested my route in
> >> different machines with different oracle databases.
> >>
> >> Following is the blueprint and scenario for new jdbc driver:
> >> Remote Oracle Database: 12.2.0.1
> >> Fuse : 6.3.0.redhat-317
> >> Blueprint:
> >> 
> >> http://www.osgi.org/xmlns/blueprint/v1.0.0";
> >> xmlns:camel="http://camel.apache.org/schema/blueprint";
> >> 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/blueprint.xsd
> >> http://camel.apache.org/schema/blueprint
> >> http://camel.apache.org/schema/blueprint/camel-blueprint.xsd";>
> >>
> >>  >> persistent-id="camelSql.Oracle" update-strategy="reload">
> >> 
> >> 
> >> 
> >>
> >>  >> class="org.apache.camel.impl.DefaultShutdownStrategy">
> >> 
> >> 
> >>
> >> 
> >> ldap://remothost:port/database,cn=OracleContext,dc=mydb"/>
> >> 
> >> 
> >> 
> >> 
> >>   
> >> 
> >>
> >> http://camel.apache.org/schema/blueprint";>
> >> 
> >>  >> uri="timer://test?delay=2000&fixedRate=true&period=2000" />
> >> 
> >> 
> >>  >> message="${in.header.CamelSqlRowCount}
> >> records are retrieved" />
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >>
> >> On Fri, Apr 12, 2019 at 11:42 AM Saiteja Parna <[hidden email]
> >> >
> >> wrote:
> >>
> >> > Fuse: 6.3.0.redhat-317  R10
> >> > My Route in blueprint: Timer to SqlSelect to SqlInsert(batch=true)
> >> > Camel-sql retrieves 4000 records and does batch insertion to Oracle
> db.
> >> > Camel-sql is taking 30 mins to insert 4000 records to Oracle
> >> > database(remote) 12.2.0.1.
> >> > Each record has 90 columns with no indexes, constraints...
> >> >
> >> > We have upgraded jdbc driver to 12.2.0.1 and started having slow
> >> > performance. Previously it was 11.2.0.4, Same transaction takes 1
> >> second to
> >> > process.
> >> >
> >> > Anyone faced the similar issue? Am i missing any property?
> >> >
> >> > Thank you.
> >> > Sai.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >> --
> >> If you reply to this email, your message will be added to the discussion
> >> below:
> >>
> >>
> http://camel.465427.n5.nabble.com/Poor-Performance-of-Camel-Sql-Batch-insertions-with-Oracle-DB-tp5833056p5833064.html
> >> To unsubscribe from Poor Performance of Camel-Sql Batch insertions with
> >> Oracle DB, click here
> >> <
> http://camel.465427.n5.nabble.com/tem

Re: camel-sql Query with params list

2016-04-01 Thread fabryprog
Hey claus!

This feature is included into 2.17.0?

/SQL component can now load the SQL queries from external resources so you
can use comments and format the queries using multi lines and indents.

In addition to that the SQL component now supports SQL IN queries where the
IN values are dynamic calculated from the message body.

And there is also support for calling stored procedures using the sqlstored
component.
/ ( http://www.davsclaus.com/2016/03/apache-camel-217-released.html )





--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-sql-Query-with-params-list-tp5778544p5780265.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Limit swagger API

2016-04-05 Thread fabryprog
Done

https://issues.apache.org/jira/browse/CAMEL-9817



--
View this message in context: 
http://camel.465427.n5.nabble.com/Limit-swagger-API-tp5778791p5780491.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Isolating header into route

2016-04-07 Thread fabryprog
Hello,

how to force my route to ISOLATING her headers?

I have this flow:

route A1
 - set CamelSqlQuery

route A2
 - set CamelSqlQuery

route B
 - execute sql based on CamelSqlQuery header

Interceptor
 - execute more sql to check permission using own CamelSqlQuery header
 - remove CamelSqlQuery header (to avoid security violation)

Now, when invoke RouteA1 (or RouteA2) followed by RouteB my interceptor
delete my CamelSqlQuery!!

There are any method to ISOLATE header into any route? It would be a private
java method.

thanks




--
View this message in context: 
http://camel.465427.n5.nabble.com/Isolating-header-into-route-tp5780684.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel 2.17.x, null values are gone

2016-05-30 Thread fabryprog
Hello,

i upgrade my camel version from 2.16.3 to 2.17.0

Server side, I am using rest component + json. 

Now I have a problem, in this version my json null values are gone!

Before camel upgrade i can send follow json

{ "first": "hello", "second": null, "third": "everyone" }

into camel 2.17.0 my json is:

{ "first": "hello", "third": "everyone" }

Where is my null value?

I just upgrade camel version, do you changed the default settings?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-17-x-null-values-are-gone-tp5783253.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel 2.17.x, null values are gone

2016-05-30 Thread fabryprog
camel (server side ) + angular (client side)

i just upgrade camel version!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-17-x-null-values-are-gone-tp5783253p5783257.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel 2.17.x, null values are gone

2016-05-30 Thread fabryprog
Everything is configured in this way by camel spring DSL

camelContext





 


Simple REST DSL


  




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-17-x-null-values-are-gone-tp5783253p5783260.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel 2.17.x, null values are gone

2016-05-31 Thread fabryprog
my solution is:




Please, insert this line into official documentation for backward
compatibility!

king regards!




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-17-x-null-values-are-gone-tp5783253p5783274.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: placeHolder

2016-05-31 Thread fabryprog
hello,

try to change

http://{{fromUrl}}/occupations?matchOnUriPrefix=true"; />




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


SWAGGER same service into different war file!

2016-06-06 Thread fabryprog
Hello,

In my tomcat7 context i have same war project within camel.

>From version 2.16.3 i wanted to add swagger api into my projects.

But there are any mistakes. All swagger JSON files are the same!! Swagger
Camel plugin merge ALL REST service also if are into different WAR!!!

Is it a colossal BUG or is it my configuration error?

In All my project I have a same web.xml into war file, so all my "Camel Rest
Servlet" have same name but there are in a different context-root!

Perhaps i must change servlet name? Any Suggestions?

I tried camel 2.17.1 version with same result!!

fabryprog



--
View this message in context: 
http://camel.465427.n5.nabble.com/SWAGGER-same-service-into-different-war-file-tp5783489.html
Sent from the Camel - Users mailing list archive at Nabble.com.


MongoDBEndpoint with wrong attributes

2016-09-05 Thread fabryprog
Hello everyone,

In my installation step, i would use mongodb components with a "failure
connection".

I have a system with some mongodb queries. i would start my camel
application with wrong attributes but today i have an exception and camel is
shutdown.

I had read source code, a fix can be:
# new endpoint attribute "raiseConnectionException"
# check attribute into MongoDBEndpoint.initializeConnection() method.

Is it possible? 

kings regards

FabryProg



--
View this message in context: 
http://camel.465427.n5.nabble.com/MongoDBEndpoint-with-wrong-attributes-tp5787199.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: MongoDBEndpoint with wrong attributes

2016-09-05 Thread fabryprog
This is my stacktrace:


Caused by: com.mongodb.MongoTimeoutException: Timed out after 3 ms while
waiting to connect. Client view of cluster state is {type=UNKNOWN,
servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING,
exception={com.mongodb.MongoSocketOpenException: Exception opening socket},
caused by {java.net.ConnectException: Connection refused}}]
at 
com.mongodb.connection.BaseCluster.getDescription(BaseCluster.java:160)
at com.mongodb.Mongo.getClusterDescription(Mongo.java:378)
at com.mongodb.Mongo.getServerAddressList(Mongo.java:371)
at com.mongodb.Mongo.getAllAddress(Mongo.java:360)
at
org.apache.camel.component.mongodb.MongoDbEndpoint.initializeConnection(MongoDbEndpoint.java:217)
at
org.apache.camel.component.mongodb.MongoDbEndpoint.createProducer(MongoDbEndpoint.java:122)
at
org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:439)
... 105 more




--
View this message in context: 
http://camel.465427.n5.nabble.com/MongoDBEndpoint-with-wrong-attributes-tp5787199p5787200.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Docker component does not work in the OSGi environment, but I have a solution

2016-09-16 Thread fabryprog
Hello i am working on new docker component release...

Thanks for your time.  I Will do it



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Docker-component-does-not-work-in-the-OSGi-environment-but-I-have-a-solution-tp5787337p5787655.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: split, tokenize, unmarshal puts objects into ArrayList

2016-09-18 Thread fabryprog
Can we have an example?



--
View this message in context: 
http://camel.465427.n5.nabble.com/split-tokenize-unmarshal-puts-objects-into-ArrayList-tp5787509p5787694.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Swagger validation with camel-swagger

2016-10-06 Thread fabryprog
Hello, this issue been fixed into 2.18.0 that will be releases within few
days



--
View this message in context: 
http://camel.465427.n5.nabble.com/Swagger-validation-with-camel-swagger-tp5788403p5788424.html
Sent from the Camel - Users mailing list archive at Nabble.com.


syslog dateformat + log4j syslog appender

2016-10-07 Thread fabryprog
Hello everyone,

I'm trying to figure out how to set log4j conversionPattern to be compatible
with the SyslogDateFormat.

I try without results:

log4j.appender.syslog.layout.conversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m

log4j.appender.syslog.layout.conversionPattern=%d{ISO8601} %-5p [%t] %c{2}
%x - %m%n

Can you help me?



--
View this message in context: 
http://camel.465427.n5.nabble.com/syslog-dateformat-log4j-syslog-appender-tp5788476.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Calling {body.getXXXXXX}from Simple EL taking > 200 ms

2016-10-07 Thread fabryprog
Can i have a test code or test mock project?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Calling-body-getXX-from-Simple-EL-taking-200-ms-tp5788478p5788481.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel swagger doesn't support array of objects as input type

2016-10-10 Thread fabryprog
An array isn't a JSON 

BUT

There is a mode to add this "special case" using dataFormatProperty tag!



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-swagger-doesn-t-support-array-of-objects-as-input-type-tp5788557p5788563.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Possible to identify previous step & configuration?

2016-10-12 Thread fabryprog
Yes, it is possible but into your steps you must use exchange properties.
Input Message and Output Message are designed to change values into every
step / processor.





--
View this message in context: 
http://camel.465427.n5.nabble.com/Possible-to-identify-previous-step-configuration-tp5788697p5788699.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel SQL

2016-10-12 Thread fabryprog
If you execute your query using alias (count(*) as c) you can use simple EL. 

http://camel.apache.org/simple.html

The query result is into body input message

For example: *${body[c]}*. It is a list of hashmap object.





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


Re: Camel Transactions query

2016-10-25 Thread fabryprog
Hello,

to manage sql transaction's query you must use

1. camel sql component (http://camel.apache.org/sql-component.html)
2. transactional client (http://camel.apache.org/transactional-client.html)
3. mark your route ""

N.B. if you invoke more nested routes without right transaction manage, you
could get out your transaction scope!

kings regards



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Transactions-query-tp5789052p5789243.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel hot deploy develop

2016-10-31 Thread fabryprog
Hello everyone,

I am searching a hot deploy framework to develop camel apps. i am thinking
an open source product similar to jrebel

http://zeroturnaround.com/software/jrebel/

Can you help me?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-hot-deploy-develop-tp5789495.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Activate Netty4 producer mode

2016-10-31 Thread fabryprog
Hello,

it is camel's slang!

Consumer:



Producer:





--
View this message in context: 
http://camel.465427.n5.nabble.com/Activate-Netty4-producer-mode-tp5789493p5789509.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to disable errorHandle in subroutes in Spring DSL

2016-10-31 Thread fabryprog
Hello,

instead of using errorHandle you can use try catch sintax:

http://camel.apache.org/try-catch-finally.html



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-disable-errorHandle-in-subroutes-in-Spring-DSL-tp5789508p5789510.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel route programmatically skipping

2017-01-31 Thread fabryprog
Hello,

I am using camel 2.18 with spring xml application context and i have a
database table with follow settings

routeId | phase

route1 | installation
route2 | standard
route3 | installation

Into my example, on installation phase i would start only route1, route3 and
skip route2.

How can do it?





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-programmatically-skipping-tp5793294.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel route programmatically skipping

2017-01-31 Thread fabryprog
controlbus is good but i am thinking any trasparent solution.

My idea was use camel servlet listener
http://camel.apache.org/servletlistener-component.html

Using servlet listener, (aka hot deploy) all route definitions worked but
all rest definitions was broke! (is it a bug?)!




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-programmatically-skipping-tp5793294p5793297.html
Sent from the Camel - Users mailing list archive at Nabble.com.