문제

I want to deploy an apache-camel application. After looking at various options available, decided to go with either

  • OSGi container (service mix)
  • Standalone

The service is used to read messages from a queue system(sqs) and update the data store(mysql) in near- real-time fashion.

What are the pros and cons of both method? What are the best practices to follow?

도움이 되었습니까?

해결책

I suggest to run it as a standalone Spring application;

OSGi will give you more pains than gains - too much complexity; or just use Apache Karaf if you really need OSGi application server; Server Mix is not evolving fast enough

다른 팁

I have been using servicemix (deployed in docker containers) for about a year and I can tell you the things I like about it...

It has a console through which you can start and stop camel routes and via which the log can be viewed and filtered. It also allows the route configuration and basic stats about the message throughput to be queried. I have found it to be a big help in debugging routes and in localizing problems in production.

The blueprint language is convenient for expressing camel routes and servicemix will deploy the configurations automatically as you update them in the deploy directory. This makes it easy for me to deploy a single docker container with a general-purpose servicemix build and have it pick up an application-specific configuration at docker deploy-time. It's also easy to mess with the configuration in real-time in my dev environment and see results quickly. The whole "REPL" thing is quick and easy.

It has proven to be stable and reliable in my environment.

I also use the servicemix ActiveMQ broker and like that there are other OSGI tools available.

Now maybe most of these advantages come directly from karaf rather than servicemix - but I have found servicemix to be a convenient bundle.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top