java - Camel 2.12 routing with RabbitMQ -
i've been attempting camel route using rabbitmqcomponent releases in 2.12.1-snapshot. in doing so, i've been able consume easily, have ad issues when routing queues.
camelcontext context = new defaultcamelcontext(); context.addcomponent("rabbit-mq", factorycomponent()); from("rabbit-mq://localhost/test.exchange&queue=test.queue&username=guest&password=guest&autodelete=false&durable=true") .log("${in.body}") .to("rabbit-mq://localhost/out.queue&routingkey=out.queue&durable=true&autoack=false&autodelete=false&username=guest&password=guest") .end();
in this, i've verified there specified exchanges configured appropriate routing keys. i've noted i'm able consume in volume, not able produce out.queue.
the following reference rabbitmqproducer process message.
09:10:28,119 debug rabbitmqproducer[main]: - starting producer: producer[rabbit-mq://localhost/out.queue?autoack=false&autodelete=false&durable=true&password=xxxxxx&routingkey=out.queue&username=guest] 09:10:48,238 debug rabbitmqproducer[camel (camel-1) thread #11 - shutdowntask]: - stopping producer: producer[rabbit-mq://localhost/out.queue?autoack=false&autodelete=false&durable=true&password=xxxxxx&routingkey=out.queue&username=guest]
i've spent time looking camel unit tests rabbitmq component, i've seen nothing of extremely valuable use. has been able work?
thanks.
i did using spring dsl. here's url used. isn't port number necessary in java dsl ?
rabbitmq://localhost:5672/subscribeexchange?queue=subscribequeue&durable=true&username=guest&password=guest&routingkey=subscribe
Comments
Post a Comment