Search code examples
apache-cameljbossfuse

Running a Spring Boot Camel inside Jboss Fuse


I have a application running Spring Boot Camel which consume message from a ActiveMQ and write to a file:

@Override
  public void configure() throws Exception {
    from("activemq:queue:MyQueue").to("file:/tmp/somemessages/");
  }

Very simple and works fine if run mvn spring-boot:run.

But now i need generate a bundle jar to install in my RedHat Fuse OSGi container. Everything was installed and started without error, see:

enter image description here So, my camel-app is Active but after produce some messages in my ActiveMQ Queue nothing works as i expect, so the file was not generated.

How can i see if something is wrong ? Application Console Log or something like this ?


Solution

  • This is not a good practice. Spring Boot is intended for running Standalone. In an OSGi based runtime such as Red Hat Fuse or Apache Karaf/ServiceMix you should deploy OSGi apps, which with Camel is camel-blueprint (you can also use Java routes with blueprint). So take a look at examples how to do that, and there should be examples shipped with Red Hat Fuse you can look at.