You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by souciance <so...@gmail.com> on 2016/06/23 07:39:21 UTC
Re: Camel route Audit and processing summury
Try using the camel message history component to see the history of the
exchange. Based on that you can proabably create a custom report.
http://camel.apache.org/message-history.html
On Thu, Jun 23, 2016 at 9:29 AM, mabahma [via Camel] <
ml-node+s465427n5784338h41@n5.nabble.com> wrote:
> Hello all,
>
> I'have the following Camel route :
>
>
> <from uri="cxf://url...">
>
> <to uri="file:///users/demo"/>
>
> <to uri="jms:queue:demo"/>
>
> <process ref="processor"/>
>
> ...
>
> <to uri="ftp://srvftp"/>
>
> <to uri="smtp://user@host"/>
>
>
> I'm looking to have ,at end of processing of the route the route, a
> summury or a report showing if the
>
> processing have been a succes or a failure and if failure in some step
> give me the error or a hint ..
>
>
> something like the following :
>
> ----------------------------------------------------------------
> Report route processing at $date
>
> Success (or Failure) :
>
> endpoint 1 ----------------------------------------------- ok
> endpoint 2 ----------------------------------------------- ok
> ....
> endpoint n ------------------------------------------------- failure or
> error sending the message to...go to
>
> log file
>
> endpoint 2---------------------------------------------------- ok
>
> etc..
>
> Is there any component to do this in the camel component list?
>
> If not what is the best way to do it ?
>
>
> Kind regards..
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Camel-route-Audit-and-processing-summury-tp5784338.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://camel.465427.n5.nabble.com/Re-Camel-route-Audit-and-processing-summury-tp5784339.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel route Audit and processing summury
Posted by mabahma <ma...@hotmail.com>.
Thank you for your replay..
I have followd your advice and used the message history EIP
(http://camel.apache.org/message-history.html) and it works perfectly.
But in log that it is giving to me , i have this :
routeid nodeid processor
elapsed
....
route1 to8 *{{url}}* 135
I'have a propertyplaceholder injectd in the context, with a props file
containing the value of url.
Why the value of url wasn't evaluated and replaced by its value?
the code is as follows :
List<MessageHistory> list = exchange.getProperty(Exchange.MESSAGE_HISTORY,
List.class);
messageHistory.getNode().getLabel() ------> gives me {{url}} and not the
real value
How can i have the real value and not just the parameter?
Kind regards,
--
View this message in context: http://camel.465427.n5.nabble.com/Re-Camel-route-Audit-and-processing-summury-tp5784339p5784377.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel route Audit and processing summury
Posted by souciance <so...@gmail.com>.
Yes, and for stacktrace and other error headers look at the standard Camel
headers for this. You can access them and build a generic error handler
route that just prints the error output. Try it out.
On Thu, Jun 23, 2016 at 11:48 AM, mabahma [via Camel] <
ml-node+s465427n5784345h58@n5.nabble.com> wrote:
> thank you very much
>
> I case of errors or exceptions, what is the output of this components,
> does it ouput the whole stacktrace
>
> ? is it possible to custumize this ?
>
> souciance wrote
> You can access the message history from java code as stated on the
> documentation.
> List<MessageHistory> list = exchange.getProperty(Exchange.MESSAGE_HISTORY,
> List.class);
>
> From there you can write your custom report.
>
> On Thu, Jun 23, 2016 at 10:03 AM, mabahma [via Camel] <
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=5784345&i=0>>
> wrote:
>
> > Ok thank you very much
> >
> > But this component uses logging
> >
> > how can i to copy the logged message to a report ?
> >
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://camel.465427.n5.nabble.com/Re-Camel-route-Audit-and-processing-summury-tp5784339p5784340.html
> > To start a new topic under Camel - Users, email
> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=5784345&i=1>
> > To unsubscribe from Camel - Users, click here
> > <
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> > .
> > NAML
> > <
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml%3E>
> >
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Re-Camel-route-Audit-and-processing-summury-tp5784339p5784345.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://camel.465427.n5.nabble.com/Re-Camel-route-Audit-and-processing-summury-tp5784339p5784347.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel route Audit and processing summury
Posted by souciance <so...@gmail.com>.
You can access the message history from java code as stated on the
documentation.
List<MessageHistory> list = exchange.getProperty(Exchange.MESSAGE_HISTORY,
List.class);
From there you can write your custom report.
On Thu, Jun 23, 2016 at 10:03 AM, mabahma [via Camel] <
ml-node+s465427n5784340h3@n5.nabble.com> wrote:
> Ok thank you very much
>
> But this component uses logging
>
> how can i to copy the logged message to a report ?
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Re-Camel-route-Audit-and-processing-summury-tp5784339p5784340.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428h31@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://camel.465427.n5.nabble.com/Re-Camel-route-Audit-and-processing-summury-tp5784339p5784341.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel route Audit and processing summury
Posted by mabahma <ma...@hotmail.com>.
Ok thank you very much
But this component uses logging
how can i to copy the logged message to a report ?
--
View this message in context: http://camel.465427.n5.nabble.com/Re-Camel-route-Audit-and-processing-summury-tp5784339p5784340.html
Sent from the Camel - Users mailing list archive at Nabble.com.