Camel Simple type:name.field not working

2020-02-06 Thread Alex Soto
I have this in my route:

${type:java.util.Collections.EMPTY_LIST}

Re: Rest DSL Query Params not copied to Exchange Header

2020-02-06 Thread Alex Soto
Look like it is caused by my:



Which is very strange, since the ones that have default value are not being 
filtered.  

However my intention (when using the header filter strategy) is to filter 
incoming HTTP request headers,  not to the headers that are copied from the 
query parameters, since this is done by Camel and it is still useful.   Is 
there a way to control this?


Best regards,
Alex soto




> On Feb 6, 2020, at 3:34 PM, Alex Soto  wrote:
> 
> Hello:
> 
> Running Camel 3.0.1.  I have a Rest DSL, where Query Params are not being 
> copied to the Exchange 
> 
>   
>  
>dataType="int" required="false"/>
>dataType="int" required="false"/>
>dataType="boolean" required="false" defaultValue="false"/>
>dataType="boolean" required="false" defaultValue="false"/>
>dataType="boolean" required="false" defaultValue="false"/>
>dataType="boolean" required="false" defaultValue="false"/>
>dataType="boolean" required="false" defaultValue="false"/>
>dataType="int" required="false"/>
>dataType="int" required="false"/>
>dataType="boolean" required="false" defaultValue="false"/>
>   
>   
>   
>   
> 
> 
> When I send a GET request to  executions?dataSchemaId=100 the exchange 
> parameters do not include the dataSchemaId parameter, but it does contain all 
> the other params that have a default value.  The Rest DSL is configured to 
> use Servlet component.  The documentation 
> https://camel.apache.org/manual/latest/rest-dsl.html 
>  seems to imply that 
> the query parameters are copied to the Exchange headers, but this is not 
> happening.  Any idea?
> 
> 
> Best regards,
> Alex soto
> 
> 
> 
> 



Rest DSL Query Params not copied to Exchange Header

2020-02-06 Thread Alex Soto
Hello:

Running Camel 3.0.1.  I have a Rest DSL, where Query Params are not being 
copied to the Exchange 


   
















When I send a GET request to  executions?dataSchemaId=100   the exchange 
parameters do not include the dataSchemaId parameter, but it does contain all 
the other params that have a default value.  The Rest DSL is configured to use 
Servlet component.  The documentation 
https://camel.apache.org/manual/latest/rest-dsl.html 
 seems to imply that the 
query parameters are copied to the Exchange headers, but this is not happening. 
 Any idea?


Best regards,
Alex soto






Re: Hazelcast Component question

2020-02-06 Thread Andrea Cosentino
You should be able to set an HazelcastInstance at component level.

So you can define a Config with all of your parameters call an
Hazelcast.getOrCreateHazelcastInstance(config)

and then set the instance on your component.

Il giorno gio 6 feb 2020 alle ore 19:21 Gershaw, Geoffrey A. <
geoffrey.gers...@credit-suisse.com> ha scritto:

> Hi All,
>
> The samples on the component's webpage do not include where to put the IP
> address/port of the hazelcast node? Could someone share how to configure it
> or update the webpage?
>
> Thanks
>
> Geoffrey A Gershaw
> CREDIT SUISSE SECURITIES (USA) LLC
> CS Sec USA LLC | Credit IT Global Loans Dev - RL, VIHE 33
> 6933 Louis Stephens Drive | Raleigh NC 27560 | Americas
> Phone +1 919 994 6412
> geoffrey.gers...@credit-suisse.com geoffrey.gers...@credit-suisse.com> | www.credit-suisse.com<
> http://www.credit-suisse.com>
>
> ===
>
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ===
>
>


Hazelcast Component question

2020-02-06 Thread Gershaw, Geoffrey A.
Hi All,

The samples on the component's webpage do not include where to put the IP 
address/port of the hazelcast node? Could someone share how to configure it or 
update the webpage?

Thanks

Geoffrey A Gershaw
CREDIT SUISSE SECURITIES (USA) LLC
CS Sec USA LLC | Credit IT Global Loans Dev - RL, VIHE 33
6933 Louis Stephens Drive | Raleigh NC 27560 | Americas
Phone +1 919 994 6412
geoffrey.gers...@credit-suisse.com | 
www.credit-suisse.com

=== 
Please access the attached hyperlink for an important electronic communications 
disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=== 


Re: SEDA consumer and parallelism

2020-02-06 Thread Alex Soto
The issue is not a-synchronic interaction between the SEDA producer and the 
SEDA consumer, that is fine, I know it is an asynchronous interaction,  but the 
fact that the steps within the SEDA route are not executed in a synchronous 
manner.   i.e. setting the synchronous=true property in the SEDA consumer is 
not causing the desired effect. 

 
Best regards,
Alex soto




> On Feb 6, 2020, at 12:09 PM, WEIQUAN YUAN  wrote:
> 
> as it is known that SEDA component is asyn component, but direct is sync
> one, can you use direct instead of seda?
> 
> On Wed, Jan 29, 2020 at 2:42 PM Alex Soto  wrote:
> 
>> Thanks Claus,
>> 
>> I tested adding synchronous=true to the SEDA consumer, but it does not
>> make any difference.
>> The only thing that worked was to add asyncDelayed=“false” to the delay
>> EIP.
>> Is this perhaps a bug?
>> 
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>>> On Jan 29, 2020, at 1:48 PM, Claus Ibsen  wrote:
>>> 
>>> On the consumer, eg the from
>>> 
>>> On Wed, Jan 29, 2020 at 5:41 PM Alex Soto  wrote:
 
 Thanks Claus….
 
 Oh, I see, after returning from the delay, it is a different thread
>> that processes the rest of the route.
 Where should the synchronous=true be added,  in the Producer or
>> Consumer or both URIs?
 
 Best regards,
 Alex soto
 
 
 
 
> On Jan 29, 2020, at 11:13 AM, Claus Ibsen 
>> wrote:
> 
> The delay makes it asynchronous, set synchronous=true on the seda
>> endpoint
> 
> On Wed, Jan 29, 2020 at 4:52 PM Alex Soto 
>> wrote:
>> 
>> Hello,
>> 
>> I have a question about SEDA consumer and parallelism.  When I set
>> the concurrentConsumers=1 and send multiple messages in parallel, I expect
>> to see the messages being processed in sequence, but what I see in the logs
>> is that they are being processed in parallel.
>> 
>> My route looks more or less like this:
>> 
>> 
>>  > uri=“seda:myconsumer?purgeWhenStopping=trueconcurrentConsumers=1exchangePattern=inOnly”/>
>>  
>>   1000
>>  
>> 
>> 
>> From logs, I can see messages being processed in parallel by this
>> route.  Any idea?
>> 
>> (Camel version is 3.0.1)
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
> 
> 
> --
> 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
>> 
>> 
> 
> -- 
> ~
> Weiquan Yuan
> Located in Ottawa, Canada



Re: SEDA consumer and parallelism

2020-02-06 Thread WEIQUAN YUAN
as it is known that SEDA component is asyn component, but direct is sync
one, can you use direct instead of seda?

On Wed, Jan 29, 2020 at 2:42 PM Alex Soto  wrote:

> Thanks Claus,
>
> I tested adding synchronous=true to the SEDA consumer, but it does not
> make any difference.
> The only thing that worked was to add asyncDelayed=“false” to the delay
> EIP.
> Is this perhaps a bug?
>
>
> Best regards,
> Alex soto
>
>
>
>
> > On Jan 29, 2020, at 1:48 PM, Claus Ibsen  wrote:
> >
> > On the consumer, eg the from
> >
> > On Wed, Jan 29, 2020 at 5:41 PM Alex Soto  wrote:
> >>
> >> Thanks Claus….
> >>
> >> Oh, I see, after returning from the delay, it is a different thread
> that processes the rest of the route.
> >> Where should the synchronous=true be added,  in the Producer or
> Consumer or both URIs?
> >>
> >> Best regards,
> >> Alex soto
> >>
> >>
> >>
> >>
> >>> On Jan 29, 2020, at 11:13 AM, Claus Ibsen 
> wrote:
> >>>
> >>> The delay makes it asynchronous, set synchronous=true on the seda
> endpoint
> >>>
> >>> On Wed, Jan 29, 2020 at 4:52 PM Alex Soto 
> wrote:
> 
>  Hello,
> 
>  I have a question about SEDA consumer and parallelism.  When I set
> the concurrentConsumers=1 and send multiple messages in parallel, I expect
> to see the messages being processed in sequence, but what I see in the logs
> is that they are being processed in parallel.
> 
>  My route looks more or less like this:
> 
>  
> uri=“seda:myconsumer?purgeWhenStopping=trueconcurrentConsumers=1exchangePattern=inOnly”/>
>    
> 1000
>    
>  
> 
>  From logs, I can see messages being processed in parallel by this
> route.  Any idea?
> 
>  (Camel version is 3.0.1)
> 
>  Best regards,
>  Alex soto
> 
> 
> 
> 
> >>>
> >>>
> >>> --
> >>> 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
>
>

-- 
~
Weiquan Yuan
Located in Ottawa, Canada


Re: Route Tracing with Camel 3.0 and BluePrint

2020-02-06 Thread Alex Soto
I’m sorry Guillaume, but I don’t see the similarity, although you may know 
something I don’t.
In any case do you know of a workaround?, basically I need to be able to enable 
tracing of exchange headers (in Blueprint) for troubleshooting, but I have not 
yet found how.
  

Best regards,
Alex soto




> On Feb 5, 2020, at 11:59 AM, Guillaume Nodet  wrote:
> 
> Looks similar to
> https://issues.apache.org/jira/projects/CAMEL/issues/CAMEL-14462
> I need to investigate it asap.
> 
> Le mer. 5 févr. 2020 à 17:48, Alex Soto  a écrit :
> 
>> This used to work with Camel 2.X, now it seems it is ignoring the
>> settings
>> 
>> 
>>
>>> class="org.apache.camel.support.processor.DefaultExchangeFormatter">
>>> value="#{camel.trace.showProperties}"/>
>>> value="#{camel.trace.showExchangePattern}"/>
>>> value="#{camel.trace.showExchangeId}"/>
>>
>>
>>
>> 
>>http://camel.apache.org/schema/blueprint;
>> id="admin" trace=“true”>
>> 
>> Specifically, when I set the showHeaders property to true the exchange
>> headers are still not logged.  Any idea?
>> 
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> 
> Guillaume Nodet



Re: Camel 3.0.1 - NullPointerException with @BeanInject

2020-02-06 Thread Remco Schoen
I created an issue for this: https://issues.apache.org/jira/browse/CAMEL-14510.

Op 31 jan. 2020, om 17:24 heeft Andrea Cosentino 
mailto:anco...@gmail.com>> het volgende geschreven:

Can you open a JIRA issue if you think this is a bug ?

Thank you

Il giorno ven 31 gen 2020 alle ore 17:23 Remco Schoen 
mailto:r.sch...@topdesk.com>>
ha scritto:

I added a null-check in the method getInjectionBeanValue of the
CamelPostProcessorHelper and that seemed to solve it:

if (camelContext != null &&
type.isAssignableFrom(camelContext.getClass())) {
   return camelContext;
}


Op 31 jan. 2020, om 17:13 heeft Remco Schoen 
mailto:r.sch...@topdesk.com>> het
volgende geschreven:

Hi,

When testing if I can use Camel 3, I’m getting a NullPointerException
when trying to start Camel.

Part of the stacktrace:

Exception in thread "main" org.apache.camel.RuntimeCamelException:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'route.dlc.ErrorRoutes': Initialization of bean failed;
nested exception is org.apache.camel.spring.GenericBeansException: Error
post processing bean: route.dlc.ErrorRoutes; nested exception is
java.lang.NullPointerException

Caused by: java.lang.NullPointerException
 at
org.apache.camel.impl.engine.CamelPostProcessorHelper.getInjectionBeanValue(CamelPostProcessorHelper.java:292)
 at
org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.injectFieldBean(DefaultCamelBeanPostProcessor.java:234)
 at
org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.lambda$injectFields$0(DefaultCamelBeanPostProcessor.java:192)
 at
org.apache.camel.util.ReflectionHelper.doWithFields(ReflectionHelper.java:108)
 at
org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.injectFields(DefaultCamelBeanPostProcessor.java:184)
 at
org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:95)
 at
org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:162)
 ... 30 more

I’m using the Spring Main class to run camel.

Any clue what could be wrong?
I’m trying to create a simple test-case.

Kind regards,

Remco Schoen