what is difference between spring & blueprint & router in apache camel? - apache-camel

I am new in Fuse. I am using Jboss Fuse and creating Fuse project.
I want to know basic difference between container like spring, blueprint and router?

Spring and blueprint are dependency injection frameworks. You use them to configure all the dependencies you will use in your JBoss Fuse application (just as jms queues or java Datasources).
Spring is a popular framework, whereas blueprint is OSGi-specific (that's why it is used in JBoss Fuse).
A router controls the flow of messages in your application. JBoss Fuse is built upon the Apache Camel lightweight integration framework, which does your routing. When you write a JBoss Fuse application, you will likely be defining Routes via Java or XML.
To read more about routing, I suggest you read about Enterprise Integration Patterns on the apache camel web site.

Related

Read camel context and routes from Database in spring boot app

I am using apache camel as my integration framework. I need to modify routes in runtime, So I am trying to read camel context and routes from database. I am developing a spring boot app. Is there any way to read routes from database and add to my spring boot app.

Deploy CXF jax-ws webservice on Websphere 8.5.5.12

I am trying to deploy a jax-ws webservice on Websphere 8.5.5.12. I am using CXF as my jax-ws engine. I have gone through the prerequisites and changed the class loader as well as desabled the JaxWs engine in websphere. I have set the property to disable Jax-WS engine in the manifest file of my war file.
My application is a Spring boot application. I am also using apache camel 2.20.1 and using the cxf end point to consume the messages.
As a spring boot application my application is working fine.
When I deploy on Websphere my application starts without any issues. But when it intercepts any incoming requests, it throws class not found exception for javax.servlet.WriteListener class. This class is part of the servlet api. It should have been part of the Websphere j2ee library.
Need to know what I did wrong. I don't want to take the shared library route. I have been suggested, that I need to move all my cxf dependencies, into a shared library and set my class loader for this library. I am not comfortable with this solution.
javax.servlet.WriteListener is a Servlet 3.1 / Java EE7 API.
WebSphere Application Server 8.5.5 implements Servlet 3.0 / Java EE6.
You should use either WebSphere Application Server 9.0.0.x or any recent WebSphere Liberty release (which has been versioned differently for quite some time).
(or, remove the 3.1 dependencies from your app if you must run it on WebSphere Application Server 8.5.5)

Can we deploy multiple camel muliple version 2.10 and 2.12.4 on Jboss Fuse 6.0

We are developing a camel route to be deployed on JBoss Fuse 6.
There are existing camel routes already deployed which are on version 2.10. But my camel application in on version 2.12.4 can both the version of the application reside on same fuse server?
It is not recommended to have two different versions of a project in the same container as you may end up in a dependency mess. That said, you can have two different versions of Camel, just make sure your manifest and osgi import sections uses the correct versions of the libraries.

Apache Camel - Backbone of IT infrastructure?

I have a bunch of web services. These services are written in different languages and expose a REST api. A front end web site accesses these services. The requests are proxied through a nginx server which does load balancing and connection management. This has been rock solid and very performant.
I'm contemplating replacing nginx with Apache Camel to take advantage of its powerful mediation and integration patterns. I have a few questions since I'm completely new to the Java ecosystem.
How performant is Apache Camel? Would the req/sec of a jetty end point be comparable to nginx?
Spring looks confusing. Can a standalone Camel application be deployed to something like AWS Elastic Beanstalk? If I want allow Camel to process more requests/sec, do I just add another Camel server in tandem?
Are there any pitfalls to using Apache Camel as the backbone to my entire IT infrastructure?
You have not mentioned what the major motivation is for changing the current architecture. Here are my comments:
How performant is Apache Camel? Would the req/sec of a jetty end point
be comparable to nginx?
I doubt if you will get the same req/sec performance from camel jetty as you do with nginx. Please dont take my word and try a load yourself with both the setup. I feel the message/exchange handling by camel will incur some cost that is missing form nginx. But both have different uses.
If I want allow Camel to process more requests/sec, do I just add
another Camel server in tandem.
This question is confusing. I assume your requests passed through one nginx. If you add multiple camel servers you need the sender to be available of the multiple camel servers or use some routing or load balancing mechanism in front of it that is aware of multiple camel instances.
Are there any pitfalls to using Apache Camel as the backbone to my
entire IT infrastructure?
This depends on what your problems are and how much of it is resolved by camel. Camel is an integration framework that supports multiple protocols. I see you only have web services which is supported by camel. But your current infrastructure already supports it.

Can I use Apache Camel with Jax-ws implementation in application server (e. WAS, WLS) without CXF or Axis2?

I dont want to use Axis2 or CXF with Camel. Is it possible to configure camel with JAX-WS reference implementation or weblogic application server or websphere application server or tomcat + jax-ws refrence implementation?
Camel provides 2 web services components out of the box: camel-cxf and camel-spring-ws. For any other web service integration just use plain java. From any Java code, you can send a message to Camel using the ProducerTemplate. Then that way you can bridge the JAX-WS of the application server with Camel. We used to have an old example at Apache Camel that showed how to integrate Axis 1.4 with Camel, but that examples has been removed as part of cleanup recently.
As far as I know that is not possible. The camel-axis and camel-cxf components are directly using the cxf and axis classes. You could use the SoapDataFormat but this is just for simple cases and not a full stack.

Resources