You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Keith Brown <ke...@gmail.com> on 2024/08/20 12:15:15 UTC

sending and receiving message

I am new to kafka. I started the server and created a topic.

Using the CLI, is it possible to send AND receive the message and
exit? Or do I need to have a separate process for it?

Re: sending and receiving message

Posted by "Matthias J. Sax" <mj...@apache.org>.
What do you mean by "timeout a consumer"?

Given that a consumer calls `poll()` and `poll()` might also return with 
no data, the consumer code is in full control anyway...

> I want to make sure
>> a certain message gets pushed if not then exit.

This sounds like writing. How it it related to a consumer?




On 8/20/24 12:34 PM, Keith Brown wrote:
> Thankyou.
> Is there a way to timeout a consumer after 60secs? I want to make sure
> a certain message gets pushed if not then exit.
> 
> On Tue, Aug 20, 2024 at 8:29 AM Tiansu Yu <ti...@klarna.com.invalid> wrote:
>>
>> You need to run on a separate process for producer and consumer (on the same machine is fine).
>>
>> Read it here for simple CLI consumer, e.g. https://www.conduktor.io/kafka/kafka-consumer-cli-tutorial/
>>
>> On 20. Aug 2024, at 14:15, Keith Brown <ke...@gmail.com> wrote:
>>
>> I am new to kafka. I started the server and created a topic.
>>
>> Using the CLI, is it possible to send AND receive the message and
>> exit? Or do I need to have a separate process for it?
>>
>>

Re: sending and receiving message

Posted by Keith Brown <ke...@gmail.com>.
Thankyou.
Is there a way to timeout a consumer after 60secs? I want to make sure
a certain message gets pushed if not then exit.

On Tue, Aug 20, 2024 at 8:29 AM Tiansu Yu <ti...@klarna.com.invalid> wrote:
>
> You need to run on a separate process for producer and consumer (on the same machine is fine).
>
> Read it here for simple CLI consumer, e.g. https://www.conduktor.io/kafka/kafka-consumer-cli-tutorial/
>
> On 20. Aug 2024, at 14:15, Keith Brown <ke...@gmail.com> wrote:
>
> I am new to kafka. I started the server and created a topic.
>
> Using the CLI, is it possible to send AND receive the message and
> exit? Or do I need to have a separate process for it?
>
>

Re: sending and receiving message

Posted by Tiansu Yu <ti...@klarna.com.INVALID>.
You need to run on a separate process for producer and consumer (on the same machine is fine). 

Read it here for simple CLI consumer, e.g. https://www.conduktor.io/kafka/kafka-consumer-cli-tutorial/ 

> On 20. Aug 2024, at 14:15, Keith Brown <ke...@gmail.com> wrote:
> 
> I am new to kafka. I started the server and created a topic.
> 
> Using the CLI, is it possible to send AND receive the message and
> exit? Or do I need to have a separate process for it?