You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by funkymonk <fu...@outlook.com> on 2013/12/05 22:55:46 UTC

Email Alerts Upon FTP Failure

Hello -

I am brand new to Camel and I've got a handful of very basic blueprint
routes up and running.   Some of my FTP routes are critical and I'd like to
receive an email alert if the FTP transmission fails.  Is there a way to do
this using the basic blueprint?  Any information would be greatly
appreciated.  Thanks!   



--
View this message in context: http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Email Alerts Upon FTP Failure

Posted by David Karlsen <da...@gmail.com>.
Have a look at:
http://camel.apache.org/exception-clause.html or
http://camel.apache.org/error-handler.html
and use http://camel.apache.org/mail.html to send the mail.

Good luck!


2013/12/5 funkymonk <fu...@outlook.com>

> Hello -
>
> I am brand new to Camel and I've got a handful of very basic blueprint
> routes up and running.   Some of my FTP routes are critical and I'd like to
> receive an email alert if the FTP transmission fails.  Is there a way to do
> this using the basic blueprint?  Any information would be greatly
> appreciated.  Thanks!
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Re: Email Alerts Upon FTP Failure

Posted by funkymonk <fu...@outlook.com>.
Thanks to all for your help.  I've done some reading and unfortunately much
of the content is way over my head   I'm a sys admin with no development
background.  As stated previously, I have several basic routes in the
Blueprint XML format.  Most of my routes grab a remote file and place it on
a FTP server, or something basic like that.  I'd like to get an email if a
route fails.  Can this be done easily within the confines of the Blueprint
XML format?   Or do I have to know Java to make this happen?

For added context, my routes essentially look like this:  

<blueprint>
<camelContext>
     <route>
           <from uri=&quot;file:// blah blah
            &lt;log message=&quot;Moving ${file:name}
            &lt;to uri=&quot;ftp://user@blah blah
      &lt;/route>
</camelContext>
</blueprint>



--
View this message in context: http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376p5744742.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Email Alerts Upon FTP Failure

Posted by funkymonk <fu...@outlook.com>.
Sounds good.  I will pick up "Camel in Action" and read up.  Thanks!  



--
View this message in context: http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376p5744687.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Email Alerts Upon FTP Failure

Posted by "kraythe ." <kr...@gmail.com>.
There is an email component in camel. SMTP specifically. You just have to
add a to() line and the appropriate configuration. A CBR is a Content Based
Router which is one of the well known Enterprise Integration Patterns. I
would advise you to get Camel in Action and read the first 2  chapters
before you do anything else. Also the book "Enterprise Integration
Patterns" would be useful to read. Without that background you will be lost
completely.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Wed, Dec 11, 2013 at 3:47 PM, funkymonk <fu...@outlook.com> wrote:

> Ok great, thank you very much.  I think I found the Blueprint Example.  My
> existing routes only have the <blueprint> and <camelContext> tags in them.
> So if I want to receive an email when the FTP transaction in my route
> fails,
> I will need to add a bean component and reference that bean in the route?
> I'm just trying to outline the process at a very high level to help me do
> my
> own research.  Right now, I'm not clear at all on what I need to do.  Any
> guidance is greatly appreciated.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376p5744639.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Email Alerts Upon FTP Failure

Posted by funkymonk <fu...@outlook.com>.
Ok great, thank you very much.  I think I found the Blueprint Example.  My
existing routes only have the <blueprint> and <camelContext> tags in them. 
So if I want to receive an email when the FTP transaction in my route fails,
I will need to add a bean component and reference that bean in the route? 
I'm just trying to outline the process at a very high level to help me do my
own research.  Right now, I'm not clear at all on what I need to do.  Any
guidance is greatly appreciated.



--
View this message in context: http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376p5744639.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Email Alerts Upon FTP Failure

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I think Rejl mixed up Apache ServiceMix with another product called JBoss Fuse.
http://www.jboss.org/products/fuse

The latter has a number of examples out of the box in the examples
directory, such as the cbr which Rejl referred too.

Apache ServiceMix has a different set of examples it provides in the
examples directory. There is some Camel examples in examples/camel
such as camel-blueprint.





On Wed, Dec 11, 2013 at 9:49 PM, funkymonk <fu...@outlook.com> wrote:
> I apologize.  I'm completely lost by this.  I've been given a Windows machine
> with apache servicemix installed, and I have several sFTP routes working
> using the blueprint XML template.  I'm struggling with the Camel
> documentation because it never seems to resemble anything that I am
> currently seeing in my environment.
>
> I do not see a "cbr" folder in my environment.  Under the examples
> directory, I only see activemq, camel, cxf, and karaf.
>
> You mention adding relevant maven dependencies in the POM file.  I see many
> pom.xml files in my apache-servicemix directory structure.  How would I know
> which to modify?
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376p5744631.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Email Alerts Upon FTP Failure

Posted by funkymonk <fu...@outlook.com>.
I apologize.  I'm completely lost by this.  I've been given a Windows machine
with apache servicemix installed, and I have several sFTP routes working
using the blueprint XML template.  I'm struggling with the Camel
documentation because it never seems to resemble anything that I am
currently seeing in my environment.  

I do not see a "cbr" folder in my environment.  Under the examples
directory, I only see activemq, camel, cxf, and karaf.  

You mention adding relevant maven dependencies in the POM file.  I see many
pom.xml files in my apache-servicemix directory structure.  How would I know
which to modify? 

      



--
View this message in context: http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376p5744631.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Email Alerts Upon FTP Failure

Posted by Reji Mathews <co...@gmail.com>.
You can put the Spring configuration in blueprint if you follow Spring DSL.
Refer to Camel example projects in \jboss-fuse-6.0.0.redhat-024\examples\cbr
They have followed spring configurations in Blueprint.

Go ahead. Make sure you add all relevant maven dependencies in the POM file.

Cheers
Reji


On Fri, Dec 6, 2013 at 6:51 PM, funkymonk <fu...@outlook.com> wrote:

> Thank you both for your response!  I'm still somewhat confused because all
> of
> the documentation seems to reference the Java DSL or Spring DSL.  I am just
> using the blueprint XML format for my routes.  Perhaps I just do not
> understand the fundamental differences in how Camel can be used.  Could
> anyone give me a very basic understanding of the circumstances where one
> would use Java DSL, Spring DSL or the blueprint XML?  Can I put Spring/Java
> statements in my blueprint XML files?  My apologies for the beginner
> questions!
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376p5744401.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Email Alerts Upon FTP Failure

Posted by funkymonk <fu...@outlook.com>.
Thank you both for your response!  I'm still somewhat confused because all of
the documentation seems to reference the Java DSL or Spring DSL.  I am just
using the blueprint XML format for my routes.  Perhaps I just do not
understand the fundamental differences in how Camel can be used.  Could
anyone give me a very basic understanding of the circumstances where one
would use Java DSL, Spring DSL or the blueprint XML?  Can I put Spring/Java
statements in my blueprint XML files?  My apologies for the beginner
questions!  



--
View this message in context: http://camel.465427.n5.nabble.com/Email-Alerts-Upon-FTP-Failure-tp5744376p5744401.html
Sent from the Camel - Users mailing list archive at Nabble.com.