Posts

Showing posts from October, 2011

JMS and Database Integration with Apache ServiceMix, Camel and ActiveMQ

I've been asked to create a simple project to demonstrate how Apache ActiveMQ, Camel and ServiceMix could be used in the same integration context. Then, for the specific customer I was talking to, I decided to create something related to the world they were used to.

This example will process messages as they are delivered on an input queue and I thought that XML would be a good format to also demonstrate how to parse the payload and generate an SQL statement  before hitting the database.

In summary, for each message going to the input queue, we're going to create a record in the database table and then generate a response message on the output queue.

I'm assuming you're already have Apache ServiceMix downloaded and installed in your machine. If not, it's time to download it… I recommend you to just go to http://fusesource.com/downloads/ and download FUSE ESB.

I'm also assuming that you already have Maven installed but if not feel free to download and install it…

Using Apache Camel for Application Notification

I was watching a forum thread (http://fusesource.com/forums/thread.jspa?threadID=3433) this week where the use case was not to consume the file content but rather the file name. That seems to be an interesting use of Apache Camel because most of people used the Camel File Component to consume the contents of the file and then do some kind of processing on top of that (routing, web services invocation, ftp, bean execution, database interaction, etc).

What brought my attention to this specific use case is that the important information here was the file name and not the content of the file. Given that the file itself was pretty large (around ~1GB) it would be a nightmare to handle all of that in memory on a Camel route or any other middleware available out there. But, this use case is really about notifying other systems or applications that a large file is available to be processed outside the route (think about a file being available for download for example) and the reason to only ca…

FuseSource Community Day in San Francisco, CA - November 17th

Thirsty for information about Apache Camel? Hungry to learn more about Apache ActiveMQ in production environments? Keen to know more about the Business Impact of Open Source Software...

Don't miss the opportunity to hear from Rob Davies (CTO of FuseSource, PMC Member, Founder and Committer on Apache ServiceMix and ActiveMQ and also the co-author of ActiveMQ in Action) and James Strachan (Creator of Groovy, member of the Apache Software Foundation and co-founder of Apache Camel). You'll be also hearing from architects, consultants and developers using those technologies in real world applications and what problems they were able to solve.

Not enough for you?!?! The FuseSource Community Day will be held at a really nice venue in downtown San Francisco called Thirsty Bear (661 Howard St., San Francisco, CA 94103).

For more information, visit the event web page: http://form.fusesource.com/sanfrancisco2011

I hope to see you all there...


Using HTTP-based endpoints with Apache Camel

Image
On a recent discussion, a partner was trying to use Apache ActiveMQ HTTP Transport Connectors to receive HTTP requests from a non-JMS Web application and asked me what I would think it could be a good approach to the use-case. Analyzing the use case, which needs a synchronous multi-step execution I suggested that they took a look in the Apache Camel Jetty component instead of Apache ActiveMQ and that was surprisingly easier to setup and maintain then the original approach.


While there is nothing wrong with the approach they thought about I think that Apache Camel would give them a more powerful setup to what they were looking for.


So, here is a sample configuration, that I created as a demo project, using Apache Camel Jetty component enabling HTTP endpoints.


In our Apache Camel route definition (using the Spring XML approach in this case) we'll have to define the Jetty endpoint similar to this:


<routeid="Jetty_Sample"> <fromuri="jetty:http://localhost:8888/myBoo…

FuseSource Training in Brazil

Since the FuseSource Brazilian tour a couple of weeks ago I've been getting more and more questions about what's next for the region. Well, here is the next step... We're going to deliver an Apache ActiveMQ training class on Nov, 16-17 in São Paulo and an Apache ServiceMix with Camel training class on November, 18-19 also in São Paulo. We are still working to get a nice venue for the training in case you wonder where this is going to happen.

I've personally been involved in the FuseSource training and I can guarantee you that's a lot of fun and tons of good information.

Here is the URL with information about the training classes: http://fusesource.com/enterprise-support/open-enrollment/ but if you have any questions please don't hesitate to contact me through this blog, Twitter (@mjabali) or e-mail (marcelo@fusesource.com).

Hope to see you there...

Apache ActiveMQ Enhancements to JMS

The JMS (Java Message Service) specification is very well-known for those working with messaging platforms but it has been around for quite some time and honestly not getting updates lately which gives a lot of room for enhancements and extensions.

As you can imagine Apache ActiveMQ goes beyond the JMS spec and implement lots of cool things where you can gain more in functionality, performance and scalability.

Starting from the top ConnectionFactory object, ActiveMQ has its own called ActiveMQConnectionFactory, as other JMS providers also create their own specific factories, ActiveMQ enhances the JMS with some settings that you can activate right away with little configuration and definitely see gains in performance.  Of course, when you optimize for performance, most of the time, you have the trade-off of more CPU utilization but I think CPU cycles are getting really cheap when comparing with network bandwidth and disk I/O.

Here is a list of things you can use to optimize performance…

FuseSource Tour in Brazil

Image
I had the pleasure to spend a week in Brazil doing a FuseSource Tour in two of the major cities... Sao Paulo and Rio de Janeiro. It's pretty clear that the Open Source community is growing really fast and the integration and messaging opportunities are hot.

Unfortunately, I couldn't visit all of the prospective partners and customers that had contacted us because we couldn't find a single empty spot on the agenda but I think the tour was an amazing experience and I'm pretty I'll back in the near future for more fun with the techies.

Some of the things I realized while traveling throughout Brazil is that the traffic is really crazy and made me remember some other cities like Los Angeles or Mexico City... You have to be really creative in terms of logistics to be able to meet more than two customers in the same day especially in Sao Paulo.

Food was a big surprise and it was pretty good either in Sao Paulo or Rio and I met nice and friendly people all over the place..…