You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by ������ ������������ <na...@gmail.com> on 2020/06/10 14:20:34 UTC
handle multiple requests
hello
i'm very new in Kafka , i have experience in Rabbit MQ
i have connection Layer which publish to Rabbit queue request and worker app which have number of threads(for example 8 equal to CPU's number) that subscribe to Rabbit Queue and each request handled with one thread
i can not find this solution in kafka please help me
Re: handle multiple requests
Posted by Ricardo Ferreira <ri...@riferrei.com>.
Hi there,
Unless you are dealing with a low volume scenario, you should avoid tie
each message/record to a specific thread. It will limit your ability to
scale the processing out as CPU is a scarce resource. Alternatively, you
should write your code to fetch multiple records at once (like a batch)
and process them using the same thread that performed the fetch -- or
hand over to another thread to decouple consumption from processing.
Regardless, each thread should handle way more than just one record at a
time. You can still control how each record is deemed processed by
handling each offset individually.
This link <https://docs.confluent.io/current/clients/java.html#ak-java>
contains a good intro about Kafka's consumer API.
Thanks,
-- Ricardo
On 6/10/20 10:20 AM, נתי אלמגור wrote:
> hello
> i'm very new in Kafka , i have experience in Rabbit MQ
> i have connection Layer which publish to Rabbit queue request and worker app which have number of threads(for example 8 equal to CPU's number) that subscribe to Rabbit Queue and each request handled with one thread
>
> i can not find this solution in kafka please help me
Re: handle multiple requests
Posted by Robin Moffatt <ro...@confluent.io>.
You might also find this resource useful in general:
https://www.confluent.io/whitepaper/comparing-confluent-platform-with-traditional-messaging-middleware/
--
Robin Moffatt | Senior Developer Advocate | robin@confluent.io | @rmoff
On Wed, 10 Jun 2020 at 16:00, נתי אלמגור <na...@gmail.com>
wrote:
> hello
> i'm very new in Kafka , i have experience in Rabbit MQ
> i have connection Layer which publish to Rabbit queue request and worker
> app which have number of threads(for example 8 equal to CPU's number) that
> subscribe to Rabbit Queue and each request handled with one thread
>
> i can not find this solution in kafka please help me
>