Aggregate Results from SEDA

2017-02-24 Thread pavijit
I have the following scenario:

1. I am making multiple calls to a SEDA route for parallel processing
2. I need to check result of all the calls to SEDA route processing
3. If all SEDA route calls were successful I need to call a DirectVM route
4. If any SEDA route call fails I need to stop all subsequent calls to SEDA
route from route that is calling SEDA route

Please help me to achieve this.

Regards
Paul



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


Re: Camel route does not reconnect

2017-02-24 Thread souciance
I would say that is a activemq setting firstly.  In websphere mq the same
thing happens unless you define a backout queue for your input queue.
Alternatively must be a setting for setting number of times the message
should be rolled back..

Den 24 feb. 2017 5:07 em skrev "Nader [via Camel]" <
ml-node+s465427n5794445...@n5.nabble.com>:

That's why I started this discussion .
If we don't restart the application then the error persist forever.

--
If you reply to this email, your message will be added to the discussion
below:
http://camel.465427.n5.nabble.com/Camel-route-does-not-
reconnect-tp5794411p5794445.html
To start a new topic under Camel - Users (activemq), email
ml-node+s465427n465429...@n5.nabble.com
To unsubscribe from Camel - Users, click here

.
NAML





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794449.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-CXF in tomee

2017-02-24 Thread Romain Manni-Bucau
What's the full stack? if you use an old camel-cdi (you didnt mention it)
then several versions were buggy and only few weld versions were supported.


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


2017-02-24 17:08 GMT+01:00 syadav :

> if I am using cxf:bean, it is giving below error.
> For your information the same application worked in glassfish server
> without
> any changes even no exclusions and with cxfbean: route.
>
> 2017-02-24 21:32:35 DEBUG DefaultCamelContext:865 - Adding routes from
> builder: Routes: []
> SEVERE - CDI Beans module deployment failed
> org.apache.webbeans.exception.WebBeansDeploymentException: Error while
> sending SystemEvent to a CDI
> Extension!
> org.apache.webbeans.portable.events.discovery.
> AfterDeploymentValidationImpl@df1b9a
> at
> org.apache.webbeans.event.NotificationManager.fireEvent(
> NotificationManager.java:697)
> at
> org.apache.webbeans.container.BeanManagerImpl.fireEvent(
> BeanManagerImpl.java:485)
> at
> org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(
> BeanManagerImpl.java:480
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-CXF-in-tomee-tp5794355p5794446.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Camel route does not reconnect

2017-02-24 Thread Nader
I am aware of request/reply pattern, hence the disableReplyTo=true at
beginning of message history.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794447.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-CXF in tomee

2017-02-24 Thread syadav
if I am using cxf:bean, it is giving below error. 
For your information the same application worked in glassfish server without
any changes even no exclusions and with cxfbean: route. 

2017-02-24 21:32:35 DEBUG DefaultCamelContext:865 - Adding routes from
builder: Routes: []
SEVERE - CDI Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException: Error while
sending SystemEvent to a CDI
Extension!
org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl@df1b9a
at
org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:697)
at
org.apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:485)
at
org.apache.webbeans.container.BeanManagerImpl.fireLifecycleEvent(BeanManagerImpl.java:480



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


Re: Camel route does not reconnect

2017-02-24 Thread Nader
That's why I started this discussion .
If we don't restart the application then the error persist forever.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794445.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Passing parameters from routes to components

2017-02-24 Thread Steve Huston
Re properties...

Sure, there is a long description at http://camel.apache.org/properties.html

There are a number of mechanisms for getting the properties injected, depending 
on how you package and deploy your application.  Here is one discussion:
http://stackoverflow.com/questions/19457818/how-do-i-load-a-camel-property-into-a-bean

Also, I have some code that loads properties that are used in a route I define 
in Java DSL. Like this:

public class Routes extends RouteBuilder {
// URI to send requests to.
@PropertyInject("backendUri")
private String backendUri;

private void validateNeededProperties() throws Exception {
if (backendUri == null)
throw new BadConfigurationException("backendUri is not set");
}

@Override
public void configure() throws Exception {
validateNeededProperties();
...
   from(INVOKE_BACKEND_URI).routeId(INVOKE_BACKEND_ROUTE_ID)
.to(backendUri)

-Steve

> -Original Message-
> From: Erol [mailto:e...@erol.si]
> Sent: Friday, February 24, 2017 9:01 AM
> To: users@camel.apache.org
> Subject: RE: Passing parameters from routes to components
> 
> Yes, can you please tell me more or do you maybe have an example?
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Passing-
> parameters-from-routes-to-components-tp5794341p5794429.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-CXF in tomee

2017-02-24 Thread Romain Manni-Bucau
isnt it cxf:bean?


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


2017-02-24 16:22 GMT+01:00 syadav :

> extended routebuilder and in configure method added following line
>
> from("servlet:///auas?servletName=CamelServlet&
> matchOnUriPrefix=true").to("cxfbean:REST_Service?providers=#JsonProvider")
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-CXF-in-tomee-tp5794355p5794438.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Camel route does not reconnect

2017-02-24 Thread souciance
Just a question, but why do you  need to restart the Camel application?
Even if you get time out the code should gracefully handle the error and
roll back or do something to indicate that an error occured but you
shouldn't have to restart it?

On Fri, Feb 24, 2017 at 4:32 PM, Nader [via Camel] <
ml-node+s465427n5794441...@n5.nabble.com> wrote:

> Thanks a lot for your suggestion.
>
> The problem as I understand it is, there is a connection between sender
> and receivers parties, but its seems that camel acts on an old session.
>
> Another thing is: The "the out message was " get into the trace in few
> milliseconds.
>
> [2017-02-24 11:10:57,068] [INFO ]   -- before
> [2017-02-24 11:10:57,079] [ERROR] -- The OUT message was not received
> within : 3 millis.
> [2017-02-24 11:10:57,082] [INFO ]   -- after
>
> I am not sure when camel starts to wait for a reply from the receiver.
>
> Secondly the message that has not been delivered is still in the Queue
> (ActiveMQ). So, after restart of application the very same message is sent
> out.
>
> Anyway, I will discuss your points with the developer.
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Camel-route-does-not-
> reconnect-tp5794411p5794441.html
> To start a new topic under Camel - Users (activemq), email
> ml-node+s465427n465429...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794442.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel route does not reconnect

2017-02-24 Thread Nader
Thanks a lot for your suggestion.

The problem as I understand it is, there is a connection between sender and
receivers parties, but its seems that camel acts on an old session.

Another thing is: The "the out message was " get into the trace in few
milliseconds. 

[2017-02-24 11:10:57,068] [INFO ]   -- before
[2017-02-24 11:10:57,079] [ERROR] -- The OUT message was not received within
: 3 millis. 
[2017-02-24 11:10:57,082] [INFO ]   -- after

I am not sure when camel starts to wait for a reply from the receiver.

Secondly the message that has not been delivered is still in the Queue
(ActiveMQ). So, after restart of application the very same message is sent
out.

Anyway, I will discuss your points with the developer.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794441.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel route does not reconnect

2017-02-24 Thread Nader
I am not developer, but am a MQ-administrator.

If you have a specific question about the code (I hope regarding the
camel-route) then I will try to provide that to you, otherwise I have to get
a developer involved into this discussion.

Doesn't the trace indicate that the session is not timing out? The receiving
application is closed.

Is there anyway to set session time out for message delivery?

Thanks in advance.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794434.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-CXF in tomee

2017-02-24 Thread syadav
extended routebuilder and in configure method added following line

from("servlet:///auas?servletName=CamelServlet&matchOnUriPrefix=true").to("cxfbean:REST_Service?providers=#JsonProvider")



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


Re: Camel route does not reconnect

2017-02-24 Thread Claus Ibsen
That OUT message error is when you do request/reply over JMS (eg
InOut) then the reply message was not sent back to the JMSReplyTo
queue within those 30 seconds, and therefore Camel times out and
fails.

The JMS component has options to set higher timeout and much more

On Fri, Feb 24, 2017 at 3:48 PM, souciance
 wrote:
> Well the thing is the statement here:
>
> [org.apache.camel.ExchangeTimedOutException: The OUT message was not
> received within:
>
> says that it got a time out issue and also at the end of the log there are
> statements that indicate the the route seems to use the mina component to
> send the data. But without looking at the code it is a bit hard to comment
> with details.
>
> But in general I would say when you are sending data then:
> 1. Either tell the developer to implement an error handler in the camel
> route so that the route retries until it receives a connection again.
> 2. Back out the message to a backout queue and manually retry after the
> connection is up. You would need to implement this as well and probably
> monitor that queue so you become aware of it.
> 3. The error seems to indicate that the rollback fails because no message
> was received within the 30 second time out value. Perhaps the developer can
> do a try/catch the exception and set the original message on the body if
> the route times out so the rollback can occur?
>
> But yeah without the code it is a bit hard to comment the details.
>
> On Fri, Feb 24, 2017 at 3:36 PM, Nader [via Camel] <
> ml-node+s465427n5794434...@n5.nabble.com> wrote:
>
>> I am not developer, but am a MQ-administrator.
>>
>> If you have a specific question about the code (I hope regarding the
>> camel-route) then I will try to provide that to you, otherwise I have to
>> get a developer involved into this discussion.
>>
>> Doesn't the trace indicate that the session is not timing out? The
>> receiving application is closed.
>>
>> Is there anyway to set session time out for message delivery?
>>
>> Thanks in advance.
>>
>> --
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://camel.465427.n5.nabble.com/Camel-route-does-not-
>> reconnect-tp5794411p5794434.html
>> To start a new topic under Camel - Users (activemq), email
>> ml-node+s465427n465429...@n5.nabble.com
>> To unsubscribe from Camel - Users, click here
>> 
>> .
>> NAML
>> 
>>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794435.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: Camel-CXF in tomee

2017-02-24 Thread Romain Manni-Bucau
how do you define the endpoint?


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


2017-02-24 15:55 GMT+01:00 syadav :

> After exclusion of camel using exclusions.list in tomee/conf,I am getting
> the
> following error and below is the exclusions.list
> default-list
> camel-cxf
>
> Please help in resolving this
>
>
> SEVERE - Failed to create route route1 at: >>>
> To[cxfbean:REST_Service?providers=#JsonProvider]
> <<< in route:
> Route(route1)[[From[servlet:///auas?servletName=CamelServlet... because of
> Failed to r
> esolve endpoint: cxfbean://REST_Service?providers=%23JsonProvider due to:
> null
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> route1
> at: >>> To[cxfbean:REST_Service?providers=#JsonProvider] <<< in route:
> Route(route1)[[From[servlet:///auas?servletName=
> CamelServlet... because of Failed to resolve endpoint:
> cxfbean://REST_Service?providers=%23JsonP
> rovider due to: null
> at
> org.apache.camel.model.RouteDefinition.addRoutes(
> RouteDefinition.java:1071)
> at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
> at
> org.apache.camel.impl.DefaultCamelContext.startRoute(
> DefaultCamelContext.java:1008)
> at
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(
> DefaultCamelContext.java:
> 3397)
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-CXF-in-tomee-tp5794355p5794436.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


RE: Passing parameters from routes to components

2017-02-24 Thread Erol
Yes, can you please tell me more or do you maybe have an example?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Passing-parameters-from-routes-to-components-tp5794341p5794429.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-CXF in tomee

2017-02-24 Thread syadav
After exclusion of camel using exclusions.list in tomee/conf,I am getting the
following error and below is the exclusions.list
default-list 
camel-cxf

Please help in resolving this


SEVERE - Failed to create route route1 at: >>>
To[cxfbean:REST_Service?providers=#JsonProvider]
<<< in route:
Route(route1)[[From[servlet:///auas?servletName=CamelServlet... because of
Failed to r
esolve endpoint: cxfbean://REST_Service?providers=%23JsonProvider due to:
null
org.apache.camel.FailedToCreateRouteException: Failed to create route route1
at: >>> To[cxfbean:REST_Service?providers=#JsonProvider] <<< in route:
Route(route1)[[From[servlet:///auas?servletName=
CamelServlet... because of Failed to resolve endpoint:
cxfbean://REST_Service?providers=%23JsonP
rovider due to: null
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1071)
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:1008)
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:
3397)



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


Re: Camel route does not reconnect

2017-02-24 Thread Nader
Sure!

After these messages, the last message "The OUT message was not receive ..."
get repeated every 30 seconds.

Exchange[ID-the-Host-34071-1487843214861-0-829]
at
country.firm.integration.route.processor.CheckExceptionProcessor.process(CheckExceptionProcessor.java:55)
at
org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
...
...
...
[2017-02-24 11:09:27,000] [WARN ] [Camel (camelContext-theApplication)
thread #0 - JmsConsumer[theQueue]] 
[org.apache.camel.spring.spi.TransactionErrorHandler] Transaction rollback
(0x75ea7aa3) redelivered(false) for 
(MessageId: ID:theRecieverHost-42190-1487661125797-23:1:-1:1:208 on
ExchangeId: ID-the-Host-34071-1487843214861-0-829) 
caught: country.firm.integration.ik.common.error.RollbackException: Original
exception:java.io.IOException, message:
Cannot write body: byte[] using session: (0x01A0: nio socket, client,
0.0.0.0/0.0.0.0:53340 => null). 
Exchange[ID-the-Host-34071-1487843214861-0-829]

[2017-02-24 11:09:27,000] [WARN ] [Camel (camelContext-theApplication)
thread #0 - JmsConsumer[theQueue]] 
[org.apache.camel.spring.spi.TransactionErrorHandler] Transaction rollback
(0x75ea7aa3) redelivered(false) for 
(MessageId: ID:theRecieverHost-42190-1487661125797-23:1:-1:1:208 on
ExchangeId: ID-the-Host-34071-1487843214861-0-829) 
caught: country.firm.integration.ik.common.error.RollbackException: Original
exception:java.io.IOException, message:
Cannot write body: byte[] using session: (0x01A0: nio socket, client,
0.0.0.0/0.0.0.0:53340 => null). 
Exchange[ID-the-Host-34071-1487843214861-0-829]

[2017-02-24 11:09:27,000] [INFO ] [Camel (camelContext-theApplication)
thread #0 - JmsConsumer[theQueue]] 
[country.firm.integration.ik.common.processor.InitProcessor$CompletionLogger]
[theHost] 
[theApplication/direct://returnResponseFromIncomingEndpoint]
[country.firm.integration.ik.common.processor.InitProcessor$CompletionLogger:$Id:
 
InitProcessor.java 33536 2015-06-16 08:41:21Z user1 $]
[Cb9df515-5a5c-431b-a077-874058119aa1] 
[SYSTEM] [End:requestId=[Cb9df515-5a5c-431b-a077-874058119aa1]
Succes=[false] externalTimeMs=[10079] timeMs=[10249]]
[2017-02-24 11:09:27,001] [WARN ] [Camel (camelContext-theApplication)
thread #0 - JmsConsumer[theQueue]] 
[org.apache.camel.component.jms.EndpointMessageListener] Execution of JMS
message listener failed. Caused by: 
[org.apache.camel.RuntimeCamelException -
country.firm.integration.ik.common.error.RollbackException: 
Original exception:java.io.IOException, message:
Cannot write body: byte[] using session: (0x01A0: nio socket, client,
0.0.0.0/0.0.0.0:53340 => null). 
Exchange[ID-the-Host-34071-1487843214861-0-829]]
org.apache.camel.RuntimeCamelException:
country.firm.integration.ik.common.error.RollbackException: 
Original exception:java.io.IOException, message:Cannot write body: byte[]
using session: 
(0x01A0: nio socket, client, 0.0.0.0/0.0.0.0:53340 => null).
Exchange[ID-the-Host-34071-1487843214861-0-829]
at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1690)
at
org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:190)
at
org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at
org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:176)
at
org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:136)
...
...
...

Caused by: country.firm.integration.ik.common.error.RollbackException:
Original exception:java.io.IOException, message:Cannot write body: byte[]
using session: (0x01A0: nio socket, client, 0.0.0.0/0.0.0.0:53340 =>
null). Exchange[ID-the-Host-34071-1487843214861-0-829]
at
country.firm.integration.route.processor.CheckExceptionProcessor.process(CheckExceptionProcessor.java:55)
at
org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
...
...
...
[2017-02-24 11:09:27,050] [INFO ] [Camel (camelContext-theApplication)
thread #0 - JmsConsumer[theQueue]] 
[AUDIT_LOGGER] [theHost]
[theApplication/direct://setupIncomingEndpointHeadersAndProperties] 
[country.firm.integration.ik.common.processor.InitProcessor:$Id:
InitProcessor.java 33536 2015-06-16 08:41:21Z user1 $] 
[f996381c-ee5d-4777-9c3c-b7f53dd4d862] [AUDIT]
[theApplication/direct://s

Re: Camel route does not reconnect

2017-02-24 Thread Nader
Thanks a lot for your quick answers.

There are two facts that I didn't include in my request for keeping it as
simple as possible.

1. If we restart the camel-integrated application, then every thing goes
alright.
The application retry to connect to the consuming-application and deliver
correctly the last message.

2. Actually, later in the java error trace, camel DefaultErrorHandler tries
to reconnect, but fails because of FatalFallbackErrorHandler.

If you wish I can paste the rest of error trace in here.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794427.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel route does not reconnect

2017-02-24 Thread souciance
Well the thing is the statement here:

[org.apache.camel.ExchangeTimedOutException: The OUT message was not
received within:

says that it got a time out issue and also at the end of the log there are
statements that indicate the the route seems to use the mina component to
send the data. But without looking at the code it is a bit hard to comment
with details.

But in general I would say when you are sending data then:
1. Either tell the developer to implement an error handler in the camel
route so that the route retries until it receives a connection again.
2. Back out the message to a backout queue and manually retry after the
connection is up. You would need to implement this as well and probably
monitor that queue so you become aware of it.
3. The error seems to indicate that the rollback fails because no message
was received within the 30 second time out value. Perhaps the developer can
do a try/catch the exception and set the original message on the body if
the route times out so the rollback can occur?

But yeah without the code it is a bit hard to comment the details.

On Fri, Feb 24, 2017 at 3:36 PM, Nader [via Camel] <
ml-node+s465427n5794434...@n5.nabble.com> wrote:

> I am not developer, but am a MQ-administrator.
>
> If you have a specific question about the code (I hope regarding the
> camel-route) then I will try to provide that to you, otherwise I have to
> get a developer involved into this discussion.
>
> Doesn't the trace indicate that the session is not timing out? The
> receiving application is closed.
>
> Is there anyway to set session time out for message delivery?
>
> Thanks in advance.
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Camel-route-does-not-
> reconnect-tp5794411p5794434.html
> To start a new topic under Camel - Users (activemq), email
> ml-node+s465427n465429...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794435.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel route does not reconnect

2017-02-24 Thread souciance
Can you share your route or at the least the "camel" part?

On Fri, Feb 24, 2017 at 2:56 PM, Nader [via Camel] <
ml-node+s465427n579442...@n5.nabble.com> wrote:

> Thanks a lot for your quick answers.
>
> There are two facts that I didn't include in my request for keeping it as
> simple as possible.
>
> 1. If we restart the camel-integrated application, then every thing goes
> alright.
> The application retry to connect to the consuming-application and deliver
> correctly the last message.
>
> 2. Actually, later in the java error trace, camel DefaultErrorHandler
> tries to reconnect, but fails because of FatalFallbackErrorHandler.
>
> If you wish I can paste the rest of error trace in here.
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Camel-route-does-not-
> reconnect-tp5794411p5794427.html
> To start a new topic under Camel - Users (activemq), email
> ml-node+s465427n465429...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-route-does-not-reconnect-tp5794411p5794428.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-CXF in tomee

2017-02-24 Thread Romain Manni-Bucau
you can check "scanning configuration" on
http://tomee.apache.org/refcard/refcard.html for the how

about the what, my blind guess is cxf and camel but depends your app



Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


2017-02-24 14:30 GMT+01:00 syadav :

> what should be excluded from scanning. Please tell me the jar and where to
> add this to skip it.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-CXF-in-tomee-tp5794355p5794420.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Camel-CXF in tomee

2017-02-24 Thread syadav
what should be excluded from scanning. Please tell me the jar and where to
add this to skip it.



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


Re: Camel route does not reconnect

2017-02-24 Thread Claus Ibsen
Its more of an ActiveMQ questions as you need to setup it properly
(failover and reconnect settings, connection pooling etc).

And also in Camel you can use its error handler to retry (redeliver) a
message, so look at Camels error handler docs.

On Fri, Feb 24, 2017 at 1:41 PM, Nader  wrote:
> Hello
>
> Our camel integrated-application gets messages from ActiveMQ and delivers it
> to a consuming-application.
>
> Because of network glitches, sometimes, the consuming-application is not
> available for a while. Even the consuming-application is online  again, the
> camel-integrated application fails to reconnect and resume the last message.
>
> The camel version is 2.17.3
>
> Is there anyway to force camel to reconnect or invalidate the session?
>
> Thanks in advance.
>
> The error look like this:
>
> [Cannot write body: byte[] using session: (0x01A0: nio socket, client,
> 0.0.0.0/0.0.0.0:53340 => null).
> Exchange[ID-the-Host-34071-1487843214861-0-829]] [java.io.IOException:
> Cannot write body: byte[] using session: (0x01A0: nio socket, client,
> 0.0.0.0/0.0.0.0:53340 => null).
> Exchange[ID-the-Host-34071-1487843214861-0-829]
> at
> country.firm.integration.route.bean.RouteTemplate.send(RouteTemplate.java:69)
> at
> country.firm.integration.route.bean.BaseDispatcherBean.sendToInOutEndpoint(BaseDispatcherBean.java:171)
> at
> country.firm.integration.route.bean.DispatcherBean.sendMessageTcpOrHl7(DispatcherBean.java:452)
> ...
> ...
> ...
> Caused by: org.apache.camel.CamelExchangeException:
>   Cannot write body: byte[] using session: (0x01A0: nio socket,
> client, 0.0.0.0/0.0.0.0:53340 => null).
>   Exchange[ID-the-Host-34071-1487843214861-0-829]
> at
> org.apache.camel.component.mina2.Mina2Helper.writeBody(Mina2Helper.java:58)
> at
> org.apache.camel.component.mina2.Mina2Producer.doProcess(Mina2Producer.java:166)
> at
> org.apache.camel.component.mina2.Mina2Producer.process(Mina2Producer.java:116)
> ...
> ...
> ...
> 2017-02-24 11:09:26,991] [INFO ] [Camel (camelContext-theApplication) thread
> #0 - JmsConsumer[theQueue]]
> [org.apache.camel.processor.DefaultErrorHandler] Failed delivery for
> (MessageId: ID:theRecieverHost-42190-1487661125797-23:1:-1:1:208 on
> ExchangeId: ID-the-Host-34071-1487843214861-0-829). Exhausted after delivery
> attempt: 1 caught:
> country.firm.integration.ik.common.error.RollbackException: Original
> exception:java.io.IOException,
> message:Cannot write body: byte[] using session: (0x01A0: nio socket,
> client, 0.0.0.0/0.0.0.0:53340 => null).
> Exchange[ID-the-Host-34071-1487843214861-0-829]. Processed by failure
> processor:
> FatalFallbackErrorHandler[Pipeline[[Channel[DelegateSync[RollbackExceptionProcessor]],
> Channel[DelegateSync[FinallyProcessor]
>
> Message History
> ---
> RouteId  ProcessorId  Processor
> Elapsed (ms)
> [SenderApp ] [SenderApp ]
> [mq://queue:theQueue?disableReplyTo=true
> ] [ 10236]
> [SenderApp ] [setHeader4] [setHeader[incomingEndpointName]
> ] [ 0]
> [SenderApp ] [to17  ] [direct:handleIncomingEndpoint
> ] [ 10236]
> [direct:handleIncom] [to15  ]
> [direct:setupIncomingEndpointHeadersAndProperties
> ] [ 1]
> [direct:setupIncomi] [doTry5] [doTry
> ] [ 1]
> [direct:setupIncomi] [DispatcherBean.set]
> [bean[country.firm.integration.route.bean.DispatcherBean@1eff0ddc]
> ] [ 0]
> [direct:handleIncom] [doTry17   ] [doTry
> ] [ 10235]
> [direct:handleIncom] [ik-common-route-in] [Processor@0x5595e0d0
> ] [ 0]
> [direct:handleIncom] [to16  ] [direct:sendMessageTransacted
> ] [ 10235]
> [direct:sendMessage] [transacted1   ]
> [transacted[ref:PROPAGATION_REQUIRES_NEW]
> ] [ 10235]
> [direct:sendMessage] [to5   ] [direct:sendMessageNonTransacted
> ] [ 10235]
> [direct:sendMessage] [to6   ] [direct:sleepAfterRollback
> ] [ 0]
> [direct:sleepAfterR] [doTry9] [doTry
> ] [ 0]
> [direct:sleepAfterR] [SleepAfterRollback] [Processor@0x51356a68
> ] [ 0]
> [direct:sendMessage] [choice1   ]
> [when[{exchangeProperty{exchangeProperty(postProcessCamelFromEndPoint)} is
> not ] [ 0]
> [direct:sendMessage] [doTry14   ] [doTry
> ] [ 10131]
> [direct:sendMessage] [to8   ] [direct:sendMessage
> ] [ 10131]
> [direct:sendMessage] [doTry12   ] [doTry
> ] [ 10131]
> [direct:sendMessage] [DispatcherBean.sen]
> [bean[country.firm.integration.route.bean.DispatcherBean@1eff0ddc]
> ] [ 10080]
> [direct:sendMessage] [to4   ] [direct:sendError
> ] [20]
> [direct:sendError  ] [doTry10   ] [doTry
> ] [  

Camel route does not reconnect

2017-02-24 Thread Nader
Hello

Our camel integrated-application gets messages from ActiveMQ and delivers it
to a consuming-application.

Because of network glitches, sometimes, the consuming-application is not
available for a while. Even the consuming-application is online  again, the
camel-integrated application fails to reconnect and resume the last message.

The camel version is 2.17.3

Is there anyway to force camel to reconnect or invalidate the session?

Thanks in advance.

The error look like this:

[Cannot write body: byte[] using session: (0x01A0: nio socket, client,
0.0.0.0/0.0.0.0:53340 => null).
Exchange[ID-the-Host-34071-1487843214861-0-829]] [java.io.IOException:
Cannot write body: byte[] using session: (0x01A0: nio socket, client,
0.0.0.0/0.0.0.0:53340 => null).
Exchange[ID-the-Host-34071-1487843214861-0-829]
at
country.firm.integration.route.bean.RouteTemplate.send(RouteTemplate.java:69)
at
country.firm.integration.route.bean.BaseDispatcherBean.sendToInOutEndpoint(BaseDispatcherBean.java:171)
at
country.firm.integration.route.bean.DispatcherBean.sendMessageTcpOrHl7(DispatcherBean.java:452)
...
...
...
Caused by: org.apache.camel.CamelExchangeException: 
  Cannot write body: byte[] using session: (0x01A0: nio socket,
client, 0.0.0.0/0.0.0.0:53340 => null). 
  Exchange[ID-the-Host-34071-1487843214861-0-829]
at
org.apache.camel.component.mina2.Mina2Helper.writeBody(Mina2Helper.java:58)
at
org.apache.camel.component.mina2.Mina2Producer.doProcess(Mina2Producer.java:166)
at
org.apache.camel.component.mina2.Mina2Producer.process(Mina2Producer.java:116)
...
...
...
2017-02-24 11:09:26,991] [INFO ] [Camel (camelContext-theApplication) thread
#0 - JmsConsumer[theQueue]] 
[org.apache.camel.processor.DefaultErrorHandler] Failed delivery for
(MessageId: ID:theRecieverHost-42190-1487661125797-23:1:-1:1:208 on 
ExchangeId: ID-the-Host-34071-1487843214861-0-829). Exhausted after delivery
attempt: 1 caught: 
country.firm.integration.ik.common.error.RollbackException: Original
exception:java.io.IOException, 
message:Cannot write body: byte[] using session: (0x01A0: nio socket,
client, 0.0.0.0/0.0.0.0:53340 => null). 
Exchange[ID-the-Host-34071-1487843214861-0-829]. Processed by failure
processor: 
FatalFallbackErrorHandler[Pipeline[[Channel[DelegateSync[RollbackExceptionProcessor]],
Channel[DelegateSync[FinallyProcessor]

Message History
---
RouteId  ProcessorId  Processor 
  
Elapsed (ms)
[SenderApp ] [SenderApp ]
[mq://queue:theQueue?disableReplyTo=true  
] [ 10236]
[SenderApp ] [setHeader4] [setHeader[incomingEndpointName]  

] [ 0]
[SenderApp ] [to17  ] [direct:handleIncomingEndpoint

] [ 10236]
[direct:handleIncom] [to15  ]
[direct:setupIncomingEndpointHeadersAndProperties 
] [ 1]
[direct:setupIncomi] [doTry5] [doTry

] [ 1]
[direct:setupIncomi] [DispatcherBean.set]
[bean[country.firm.integration.route.bean.DispatcherBean@1eff0ddc]
] [ 0]
[direct:handleIncom] [doTry17   ] [doTry

] [ 10235]
[direct:handleIncom] [ik-common-route-in] [Processor@0x5595e0d0 

] [ 0]
[direct:handleIncom] [to16  ] [direct:sendMessageTransacted 

] [ 10235]
[direct:sendMessage] [transacted1   ]
[transacted[ref:PROPAGATION_REQUIRES_NEW] 
] [ 10235]
[direct:sendMessage] [to5   ] [direct:sendMessageNonTransacted  

] [ 10235]
[direct:sendMessage] [to6   ] [direct:sleepAfterRollback

] [ 0]
[direct:sleepAfterR] [doTry9] [doTry

] [ 0]
[direct:sleepAfterR] [SleepAfterRollback] [Processor@0x51356a68 

] [ 0]
[direct:sendMessage] [choice1   ]
[when[{exchangeProperty{exchangeProperty(postProcessCamelFromEndPoint)} is
not ] [ 0]
[direct:sendMessage] [doTry14   ] [doTry

] [ 10131]
[direct:sendMessage] [to8   ] [direct:sendMes

Re: Multiple camel producers instantiated

2017-02-24 Thread Shiva
Hi John,

The endpoint is already a Singleton. The issue doesn't happen when I start
the application. The application starts with an Endpoint creating a producer
for that endpoint. But after a some messages are successfully produced and
consumed, there is another Producer instantiated when a message was sent.

Thanks!



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


Re: Camel-CXF in tomee

2017-02-24 Thread Romain Manni-Bucau
as expected in a EE container, org.apache.cxf.databinding.AbstractDataBinding
is scanned but this is not a valid EE class so you need to ensure it is
excluded from the scanning on one side and on the other side you need to
ensure you dont have conflicts between the container and application (there
is a way to solve it but saner if you sort it without too much classloading
config). Your error just mean your classloader is not well setup and half
is taken from the container and the other half from the webapp.


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


2017-02-24 9:37 GMT+01:00 syadav :

> I did not understand what to do. Could you please explain me what to do.
> Note: I am not using spring configuration.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-CXF-in-tomee-tp5794355p5794387.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Camel-CXF in tomee

2017-02-24 Thread syadav
I did not understand what to do. Could you please explain me what to do.
Note: I am not using spring configuration.



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


Re: Camel-CXF in tomee

2017-02-24 Thread Romain Manni-Bucau
Hi

I don't see the link since you don't use CDI there right? if you use
camel-cdi and/or cxf-cdi you need to exclude all but these ones.


Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | JavaEE Factory


2017-02-24 9:22 GMT+01:00 syadav :

> Hi,
>  I tried this but no use. I added the cxf jars to catalina.properties
> tomcat.util.scan.StandardJarScanFilter.jarsToSkip, but it is giving error
> as
> no cxfbean found. This is because in my project I am using cxfbean for
> routing it to webservice class. This is using JAVA DSL.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-CXF-in-tomee-tp5794355p5794385.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Camel-CXF in tomee

2017-02-24 Thread syadav
Hi,
 I tried this but no use. I added the cxf jars to catalina.properties
tomcat.util.scan.StandardJarScanFilter.jarsToSkip, but it is giving error as
no cxfbean found. This is because in my project I am using cxfbean for
routing it to webservice class. This is using JAVA DSL.




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


Re: Is it possible to set the delimiter of header and body of csv file differently?

2017-02-24 Thread Tomohisa Igarashi

Hi,

You can parse the header by your own bean before marshal and then specify 
'skipFirstLine' on csv dataformat.
http://camel.apache.org/csv.html

Thanks,
Tomo


On 02/24/2017 03:00 PM, Juno wrote:

Is it possible to set the delimiter of the header and the delimiter of the
csv file contents differently when storing it in the message queue with csv?

For example, I want to set the delimiter of the header to '|' and the
delimiter of the body to ','.

Header1 | Header2 | Header3 | Header 4 | Header5
Row1-1, row1-2, row1-3, row1-4, row1-5
Row2-1, row2-2, row2-3, row2-4, row2-5
Row3-1, row3-2, row3-3, row3-4, row3-5
.
.
.


The camel route configuration is shown below.






CHARGE_ID
AUTHPOLICY_SEQ
UPMU_CD
CHARGE_NM
HTEL
EMAIL







With this setting, both the header and delimiter of the body are '|' .

Thank you for your kind comments.
Thank you.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-it-possible-to-set-the-delimiter-of-header-and-body-of-csv-file-differently-tp5794375.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Is it possible to set the delimiter of header and body of csv file differently?

2017-02-24 Thread Claus Ibsen
Hi

I would not think so. You can check the commons csv what is supports.
Otherwise you can also just do a search replace on the first line to
change the | to , in the header line so they use the same delimiter

On Fri, Feb 24, 2017 at 7:00 AM, Juno  wrote:
> Is it possible to set the delimiter of the header and the delimiter of the
> csv file contents differently when storing it in the message queue with csv?
>
> For example, I want to set the delimiter of the header to '|' and the
> delimiter of the body to ','.
>
> Header1 | Header2 | Header3 | Header 4 | Header5
> Row1-1, row1-2, row1-3, row1-4, row1-5
> Row2-1, row2-2, row2-3, row2-4, row2-5
> Row3-1, row3-2, row3-3, row3-4, row3-5
> .
> .
> .
>
>
> The camel route configuration is shown below.
>
> 
> 
>  uri="mybatis:com.test.SampleMapper.selectList?statementType=SelectList&consumer.useIterator=false"
> />
> 
> 
> CHARGE_ID
> AUTHPOLICY_SEQ
> UPMU_CD
> CHARGE_NM
> HTEL
> EMAIL
> 
> 
> 
> 
> 
>
>
> With this setting, both the header and delimiter of the body are '|' .
>
> Thank you for your kind comments.
> Thank you.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Is-it-possible-to-set-the-delimiter-of-header-and-body-of-csv-file-differently-tp5794375.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


Is it possible to set the delimiter of header and body of csv file differently?

2017-02-24 Thread Juno
Is it possible to set the delimiter of the header and the delimiter of the
csv file contents differently when storing it in the message queue with csv?

For example, I want to set the delimiter of the header to '|' and the
delimiter of the body to ','.

Header1 | Header2 | Header3 | Header 4 | Header5
Row1-1, row1-2, row1-3, row1-4, row1-5
Row2-1, row2-2, row2-3, row2-4, row2-5
Row3-1, row3-2, row3-3, row3-4, row3-5
.
.
.


The camel route configuration is shown below.






CHARGE_ID
AUTHPOLICY_SEQ
UPMU_CD
CHARGE_NM
HTEL
EMAIL







With this setting, both the header and delimiter of the body are '|' .

Thank you for your kind comments.
Thank you.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Is-it-possible-to-set-the-delimiter-of-header-and-body-of-csv-file-differently-tp5794375.html
Sent from the Camel - Users mailing list archive at Nabble.com.