Hi

Can you try with the spring-rabbitmq component

On Fri, Dec 3, 2021 at 11:38 PM V User <vuser...@gmail.com> wrote:
>
> Hello!
>
> I'm new to Camel and setting up my first flow, an adaptor for an existing
> system with an API that uses RabbitMQ. The API already defines a queue to
> publish messages to, and a queue where responses will be published back to.
> I'm trying to get Camel to read replies from the existing queue. I thought
> that setting the CamelRabbitmqReplyTo header (
> https://camel.apache.org/components/3.13.x/rabbitmq-component.html#_message_headers)
> on the exchange during a processor call would do it, but it seems that
> value gets overwritten by the RabbitMQProducer during processing. Is this
> the intended behavior? Is there a different stage I should be setting it on
> that would catch it post-process or something? I also can't find any config
> option to set a ReplyTo value on the RabbitMQ component or anything like
> that.
>
> For reference, here's my route configuration:
>     from("netty:tcp://{{tcp.host}}:{{tcp.port.number}}?sync=true")
>         .process(m_inboundProcessor)
>         .to("rabbitmq:camel?"
>             + "request-Timeout=3000&"
>             + "connectionFactory=rabbitmqConnectionFactory&"
>             + "queue={{rabbitmq.exchange.routingKey}}&"
>             + "routingKey={{rabbitmq.exchange.routingKey}}&"
>             + "autoDelete=false&"
>             + "allowCustomHeaders=true")
>         .log("Received body: ${body}");
>
> And here's the relevant line from m_inboundProcessor:
>     exchange.getIn().getHeaders().put("CamelRabbitmqReplyTo",
> "apiQueueName");
>
> Is extending TemporaryQueueReplyManager to set a standard value for replyTo
> maybe possible?
>
> Thanks,
> Zoe



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to