Creating message queue in spring boot using apache camelWhat exactly is Apache Camel?How to use Apache Camel correctly for specific scenario?Apache Camel: can message have multiple objects in body (with different classes)?How to configure port for a Spring Boot applicationApache Camel: MailMessage email Headers are emptyapache-camel apache-cxf IllegalStateException: Could not register object under bean name 'cxf': there is already object boundHow are ProducerTemplate and Apache Camel routes linked in Spring application?Spring Boot Camel Testing - No consumers available on endpointspring boot,No qualifying bean of type found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependencyExpected at least 1 bean which qualifies as autowire candidate for this dependency, No qualifying bean of type found for dependency

How major are these paintwork & rust problems?

How offensive is the French word "femmelette" considered to be?

How to publish superseding results without creating enemies

What jurisdiction do Scottish courts have over the Westminster parliament?

What was the ultimate objective of The Party in 1984?

I was promised a work PC but still awaiting approval 3 months later so using my own laptop - Is it fair to ask employer for laptop insurance?

Is there a tool to measure the "maturity" of a code in Git?

Real mode flat model

Ambiguity in notation resolved by +

Should you only use colons and periods in dialogues?

Some Prime Peerage

Why are some files not movable on Windows 10?

Are there any “Third Order” acronyms used in space exploration?

How does a linear operator act on a bra?

Write a function that returns an iterable object of all valid points 4-directionally adjacent to (x, y)

Is Schwarzschild's solution in his original paper consistent with current solutions?

How can I discourage sharing internal API keys within a company?

Can I fix my boots by gluing the soles back on?

Is using gradient descent for MIP a good idea?

Should I leave the first authorship of our paper to the student who did the project whereas I solved it?

In a hashmap, the addition of a new element to the internal linked list of a bucket is always at the end. Why?

Why is the year in this ISO timestamp not 2019?

What makes a smart phone "kosher"?

What is this gigantic dish at Ben Gurion airport?



Creating message queue in spring boot using apache camel


What exactly is Apache Camel?How to use Apache Camel correctly for specific scenario?Apache Camel: can message have multiple objects in body (with different classes)?How to configure port for a Spring Boot applicationApache Camel: MailMessage email Headers are emptyapache-camel apache-cxf IllegalStateException: Could not register object under bean name 'cxf': there is already object boundHow are ProducerTemplate and Apache Camel routes linked in Spring application?Spring Boot Camel Testing - No consumers available on endpointspring boot,No qualifying bean of type found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependencyExpected at least 1 bean which qualifies as autowire candidate for this dependency, No qualifying bean of type found for dependency






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm very newbie to this messaging queue and just started learning some basic stuffs in this.



So for our spring boot application we followed an architecture like contoller talks to service & service talks to repository so here i have to create one controller that will accept a class DTO as a json and post these information to the message queue specified in the apache camel.
I'm following this link ! for my reference that works well but when i tried to implement it in my project , it saying me an error listed below.



Error




Exception encountered during context initialization - cancelling
refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'trackerQueueController': Unsatisfied
dependency expressed through field 'camelContext'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
qualifying bean of type 'org.apache.camel.CamelContext' available:
expected at least 1 bean which qualifies as autowire candidate.
Dependency annotations:
@org.springframework.beans.factory.annotation.Autowired(required=true)




I have created an controller,routes & processor as below:



Controller



@RestController
@RequestMapping("/deviceinfo")
public class TrackerQueueController
@Autowired
CamelContext camelContext;

@Autowired
private
ProducerTemplate producerTemplate;

@PostMapping()
public void startCamel(@RequestBody FieldUpdate fieldUpdate)
producerTemplate.sendBody("activemq:topic:in", fieldUpdate);




Routes



 @Component
public class TrackerQueueRoutes extends RouteBuilder
@Override
public void configure() throws Exception
from("activemq:topic:in")
.process(new TrackerProcessor()
@Override
public void process(Exchange exchange) throws
Exception
log.info("I'm in");
FieldUpdate body =
exchange.getIn().getBody(FieldUpdate.class);
log.info("Hello from camel processed message!
Received payload: " , body.getSerialNumber());

exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE,
HttpStatus.ACCEPTED);

);




Processor



public class TrackerProcessor implements Processor 
@Override
public void process(Exchange exchange) throws Exception





Can any one provide me some tutorial link that fulfil my need or any ideas.










share|improve this question


























  • Do you have camel-spring-boot-starter as dependency. See for example the camel spring boot examples at: github.com/apache/camel/tree/camel-2.x/examples

    – Claus Ibsen
    Mar 28 at 13:03


















0















I'm very newbie to this messaging queue and just started learning some basic stuffs in this.



So for our spring boot application we followed an architecture like contoller talks to service & service talks to repository so here i have to create one controller that will accept a class DTO as a json and post these information to the message queue specified in the apache camel.
I'm following this link ! for my reference that works well but when i tried to implement it in my project , it saying me an error listed below.



Error




Exception encountered during context initialization - cancelling
refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'trackerQueueController': Unsatisfied
dependency expressed through field 'camelContext'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
qualifying bean of type 'org.apache.camel.CamelContext' available:
expected at least 1 bean which qualifies as autowire candidate.
Dependency annotations:
@org.springframework.beans.factory.annotation.Autowired(required=true)




I have created an controller,routes & processor as below:



Controller



@RestController
@RequestMapping("/deviceinfo")
public class TrackerQueueController
@Autowired
CamelContext camelContext;

@Autowired
private
ProducerTemplate producerTemplate;

@PostMapping()
public void startCamel(@RequestBody FieldUpdate fieldUpdate)
producerTemplate.sendBody("activemq:topic:in", fieldUpdate);




Routes



 @Component
public class TrackerQueueRoutes extends RouteBuilder
@Override
public void configure() throws Exception
from("activemq:topic:in")
.process(new TrackerProcessor()
@Override
public void process(Exchange exchange) throws
Exception
log.info("I'm in");
FieldUpdate body =
exchange.getIn().getBody(FieldUpdate.class);
log.info("Hello from camel processed message!
Received payload: " , body.getSerialNumber());

exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE,
HttpStatus.ACCEPTED);

);




Processor



public class TrackerProcessor implements Processor 
@Override
public void process(Exchange exchange) throws Exception





Can any one provide me some tutorial link that fulfil my need or any ideas.










share|improve this question


























  • Do you have camel-spring-boot-starter as dependency. See for example the camel spring boot examples at: github.com/apache/camel/tree/camel-2.x/examples

    – Claus Ibsen
    Mar 28 at 13:03














0












0








0








I'm very newbie to this messaging queue and just started learning some basic stuffs in this.



So for our spring boot application we followed an architecture like contoller talks to service & service talks to repository so here i have to create one controller that will accept a class DTO as a json and post these information to the message queue specified in the apache camel.
I'm following this link ! for my reference that works well but when i tried to implement it in my project , it saying me an error listed below.



Error




Exception encountered during context initialization - cancelling
refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'trackerQueueController': Unsatisfied
dependency expressed through field 'camelContext'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
qualifying bean of type 'org.apache.camel.CamelContext' available:
expected at least 1 bean which qualifies as autowire candidate.
Dependency annotations:
@org.springframework.beans.factory.annotation.Autowired(required=true)




I have created an controller,routes & processor as below:



Controller



@RestController
@RequestMapping("/deviceinfo")
public class TrackerQueueController
@Autowired
CamelContext camelContext;

@Autowired
private
ProducerTemplate producerTemplate;

@PostMapping()
public void startCamel(@RequestBody FieldUpdate fieldUpdate)
producerTemplate.sendBody("activemq:topic:in", fieldUpdate);




Routes



 @Component
public class TrackerQueueRoutes extends RouteBuilder
@Override
public void configure() throws Exception
from("activemq:topic:in")
.process(new TrackerProcessor()
@Override
public void process(Exchange exchange) throws
Exception
log.info("I'm in");
FieldUpdate body =
exchange.getIn().getBody(FieldUpdate.class);
log.info("Hello from camel processed message!
Received payload: " , body.getSerialNumber());

exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE,
HttpStatus.ACCEPTED);

);




Processor



public class TrackerProcessor implements Processor 
@Override
public void process(Exchange exchange) throws Exception





Can any one provide me some tutorial link that fulfil my need or any ideas.










share|improve this question
















I'm very newbie to this messaging queue and just started learning some basic stuffs in this.



So for our spring boot application we followed an architecture like contoller talks to service & service talks to repository so here i have to create one controller that will accept a class DTO as a json and post these information to the message queue specified in the apache camel.
I'm following this link ! for my reference that works well but when i tried to implement it in my project , it saying me an error listed below.



Error




Exception encountered during context initialization - cancelling
refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'trackerQueueController': Unsatisfied
dependency expressed through field 'camelContext'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
qualifying bean of type 'org.apache.camel.CamelContext' available:
expected at least 1 bean which qualifies as autowire candidate.
Dependency annotations:
@org.springframework.beans.factory.annotation.Autowired(required=true)




I have created an controller,routes & processor as below:



Controller



@RestController
@RequestMapping("/deviceinfo")
public class TrackerQueueController
@Autowired
CamelContext camelContext;

@Autowired
private
ProducerTemplate producerTemplate;

@PostMapping()
public void startCamel(@RequestBody FieldUpdate fieldUpdate)
producerTemplate.sendBody("activemq:topic:in", fieldUpdate);




Routes



 @Component
public class TrackerQueueRoutes extends RouteBuilder
@Override
public void configure() throws Exception
from("activemq:topic:in")
.process(new TrackerProcessor()
@Override
public void process(Exchange exchange) throws
Exception
log.info("I'm in");
FieldUpdate body =
exchange.getIn().getBody(FieldUpdate.class);
log.info("Hello from camel processed message!
Received payload: " , body.getSerialNumber());

exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE,
HttpStatus.ACCEPTED);

);




Processor



public class TrackerProcessor implements Processor 
@Override
public void process(Exchange exchange) throws Exception





Can any one provide me some tutorial link that fulfil my need or any ideas.







spring spring-boot apache-camel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 10:56









Mebin Joe

1,2181 gold badge11 silver badges20 bronze badges




1,2181 gold badge11 silver badges20 bronze badges










asked Mar 28 at 10:52









Pranesh sawPranesh saw

186 bronze badges




186 bronze badges















  • Do you have camel-spring-boot-starter as dependency. See for example the camel spring boot examples at: github.com/apache/camel/tree/camel-2.x/examples

    – Claus Ibsen
    Mar 28 at 13:03


















  • Do you have camel-spring-boot-starter as dependency. See for example the camel spring boot examples at: github.com/apache/camel/tree/camel-2.x/examples

    – Claus Ibsen
    Mar 28 at 13:03

















Do you have camel-spring-boot-starter as dependency. See for example the camel spring boot examples at: github.com/apache/camel/tree/camel-2.x/examples

– Claus Ibsen
Mar 28 at 13:03






Do you have camel-spring-boot-starter as dependency. See for example the camel spring boot examples at: github.com/apache/camel/tree/camel-2.x/examples

– Claus Ibsen
Mar 28 at 13:03













1 Answer
1






active

oldest

votes


















1
















As Claus Ibsen suggested in the comments, you have to add these dependencies to your POM file



<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-boot-starter</artifactId>
<version>[camel-version]</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>



  • camel-spring-boot-starter automatically starts a CamelContext for you, discovers routes etc


  • spring-boot-starter-web keeps your application running by listening for web requests. Otherwise it would immediately shut down after startup because there is nothing to execute.

Since your Camel route class is correctly annotated (@Component) and subclassed (extends RouteBuilder), it should be auto-discovered by the Camel SpringBoot starter.



See the Camel-SpringBoot docs for all these topics and more.






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395763%2fcreating-message-queue-in-spring-boot-using-apache-camel%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1
















    As Claus Ibsen suggested in the comments, you have to add these dependencies to your POM file



    <dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-spring-boot-starter</artifactId>
    <version>[camel-version]</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    </dependency>



    • camel-spring-boot-starter automatically starts a CamelContext for you, discovers routes etc


    • spring-boot-starter-web keeps your application running by listening for web requests. Otherwise it would immediately shut down after startup because there is nothing to execute.

    Since your Camel route class is correctly annotated (@Component) and subclassed (extends RouteBuilder), it should be auto-discovered by the Camel SpringBoot starter.



    See the Camel-SpringBoot docs for all these topics and more.






    share|improve this answer





























      1
















      As Claus Ibsen suggested in the comments, you have to add these dependencies to your POM file



      <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring-boot-starter</artifactId>
      <version>[camel-version]</version>
      </dependency>
      <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      </dependency>



      • camel-spring-boot-starter automatically starts a CamelContext for you, discovers routes etc


      • spring-boot-starter-web keeps your application running by listening for web requests. Otherwise it would immediately shut down after startup because there is nothing to execute.

      Since your Camel route class is correctly annotated (@Component) and subclassed (extends RouteBuilder), it should be auto-discovered by the Camel SpringBoot starter.



      See the Camel-SpringBoot docs for all these topics and more.






      share|improve this answer



























        1














        1










        1









        As Claus Ibsen suggested in the comments, you have to add these dependencies to your POM file



        <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-spring-boot-starter</artifactId>
        <version>[camel-version]</version>
        </dependency>
        <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        </dependency>



        • camel-spring-boot-starter automatically starts a CamelContext for you, discovers routes etc


        • spring-boot-starter-web keeps your application running by listening for web requests. Otherwise it would immediately shut down after startup because there is nothing to execute.

        Since your Camel route class is correctly annotated (@Component) and subclassed (extends RouteBuilder), it should be auto-discovered by the Camel SpringBoot starter.



        See the Camel-SpringBoot docs for all these topics and more.






        share|improve this answer













        As Claus Ibsen suggested in the comments, you have to add these dependencies to your POM file



        <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-spring-boot-starter</artifactId>
        <version>[camel-version]</version>
        </dependency>
        <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        </dependency>



        • camel-spring-boot-starter automatically starts a CamelContext for you, discovers routes etc


        • spring-boot-starter-web keeps your application running by listening for web requests. Otherwise it would immediately shut down after startup because there is nothing to execute.

        Since your Camel route class is correctly annotated (@Component) and subclassed (extends RouteBuilder), it should be auto-discovered by the Camel SpringBoot starter.



        See the Camel-SpringBoot docs for all these topics and more.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 16:07









        burkiburki

        2,6671 gold badge6 silver badges20 bronze badges




        2,6671 gold badge6 silver badges20 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















            draft saved

            draft discarded















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395763%2fcreating-message-queue-in-spring-boot-using-apache-camel%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해