You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ma...@gmail.com on 2021/08/19 13:59:49 UTC

Bug in FluentProducerTemplate? please confirm

Hello!

Please confirm I faced a bug.

This fluent producer does not send body to endpoint:

camelContext.createFluentProducerTemplate()
  .withBody(DATA)
  .withProcessor(exchange -> exchange.setProperty("prop", DATA))
  .to(ENDPOINT_IN)
  .send();

And this one does:

camelContext.createFluentProducerTemplate()
  .withBody(DATA)
  //.withProcessor(exchange -> exchange.setProperty("prop", DATA))
  .to(ENDPOINT_IN)
  .send();


My code with tests is here: 
https://github.com/bvn13/camel-bug-fluent-producer-template/blob/master/src/test/java/com/bvn13/bug/camel/fluentproducertemplate/camelbugfluentproducertemplate/CamelBugFluentProducerTemplateApplicationTests.java


_________________
Vyacheslav Boyko,
mailto:mail4bvn@gmail.com


Re: Bug in FluentProducerTemplate? please confirm

Posted by ma...@gmail.com.
Claus, Hi!

Did you miss this? Can you comment my findings? I cannot see anything
in the Camel documentation about this behavior.

On Thu, 2021-08-19 at 16:59 +0300, mail4bvn@gmail.com wrote:
> Hello!
> 
> Please confirm I faced a bug.
> 
> This fluent producer does not send body to endpoint:
> 
> camelContext.createFluentProducerTemplate()
>   .withBody(DATA)
>   .withProcessor(exchange -> exchange.setProperty("prop", DATA))
>   .to(ENDPOINT_IN)
>   .send();
> 
> And this one does:
> 
> camelContext.createFluentProducerTemplate()
>   .withBody(DATA)
>   //.withProcessor(exchange -> exchange.setProperty("prop", DATA))
>   .to(ENDPOINT_IN)
>   .send();
> 
> 
> My code with tests is here: 
> https://github.com/bvn13/camel-bug-fluent-producer-template/blob/master/src/test/java/com/bvn13/bug/camel/fluentproducertemplate/camelbugfluentproducertemplate/CamelBugFluentProducerTemplateApplicationTests.java
> 
> 
> _________________
> Vyacheslav Boyko,
> mailto:mail4bvn@gmail.com
> 

-- 
_________________
Vyacheslav Boyko,
mailto:mail4bvn@gmail.com