Skip to content

Auto create exchange by spring boot rabbit mq producer #1081

Closed Answered by rapetum228
rapetum228 asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to create a RabbitMq exchange by adding Process in the route itself

import org.apache.camel.BindToRegistry;
import org.apache.camel.BeanInject;
import org.apache.camel.Configuration;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.rabbit.core.RabbitAdmin;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;

@Configuration
@BindToRegistry("CustomProcess")
public class CustomProcess implements Processor {

    @BeanInject("KaravanRabbitConnection")
    private CachingConnectionFactory connectionFactory;

    public void process(Exchange exchange) throws 

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@davsclaus
Comment options

@davsclaus
Comment options

@rapetum228
Comment options

@rapetum228
Comment options

Answer selected by davsclaus
@davsclaus
Comment options

Comment options

You must be logged in to vote
1 reply
@rapetum228
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants