[
https://issues.apache.org/jira/browse/CAMEL-9957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15283810#comment-15283810
]
Claus Ibsen commented on CAMEL-9957:
------------------------------------
The AsyncProcessor is extending Processor so if you implement AsyncProcessor
you also get the synchronous processor. They are not separated.
The producer is such an example as its both processor / async processor and
therefore Camel routing engine will call favor calling the async processor
method. There is no check if the processor was created from an endpoint that
has a synchronous=true option. This option is not on the endpoint interface,
but only an implementation detail on the default endpoint.
Whether it would be an idea for Camel 3.0 to
- separate Processor and AsyncProcessor
- move synchronous as an option to endpoint interface
is something we could consider.
But for 2.x you could either
- create 2 different producer implementations and in the endpoint in the
createProducer method chose either the sync vs async implementation
- use current code
- refactor current code to be a bit better (which I am doing) and then the code
is like what we do in other components that may have a forced synchronous mode.
> camel-kafka producer sends the message in an async way
> ------------------------------------------------------
>
> Key: CAMEL-9957
> URL: https://issues.apache.org/jira/browse/CAMEL-9957
> Project: Camel
> Issue Type: Improvement
> Affects Versions: 2.17.1
> Reporter: Willem Jiang
> Assignee: Willem Jiang
> Fix For: 2.17.2, 2.18.0
>
>
> CAMEL-9790 made the sync sending, it could cause some trouble when ppl has
> lots of data to send.
> We need to provide an async way to send the message to kafka.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)