Hi all,
My 2c:
Pros of "Produce":
- Same as Kafka Protocol "ProduceRequest" and simple enough
"producer#produce()"; though consumer also differ between "FetchRequest"
and "consumer#poll".
- As reference, other libraries also use "produce", e.g.:
librdkafka-derived libraries:
[confluent-kafka-python](https://github.com/confluentinc/confluent-kafka-python),
[confluent-kafka-go](https://github.com/confluentinc/confluent-kafka-go)
Pros of "Publish":
- Known from "pub/sub"; though consumer does not "Subscribe" neither.
I personally find that "transmit" adds a bit more complexity than the
alternatives, as it makes me compare it with "send" and if the semantics
are the same.
I also like "append", as it represents the operation more precisely:
append to the batch/buffer to flush async.
If we want to "change" the semantics I'd consider between "append" and
"write" alternatives.
Jorge.
On 30/01/2021 12:21, Govinda Sakhare wrote:
Hi,
Indeed `transmit(msg)` looks good. Another option could be `publish(msg)`
Best Regards,
Govinda
On Sat, Jan 30, 2021, 17:45 Chia-Ping Tsai <chia7...@apache.org> wrote:
hi Jason
Thanks for your response. "transmit" is good to me.
As we discussed by email, KIP-706 is going to be merged to KIP-691(
https://cwiki.apache.org/confluence/x/PSfZCQ). Hence, please feel free to
replace "produce" by "transmit" in KIP-691.
Best,
Chia-Ping
On 2021/01/30 00:48:38, Jason Gustafson <ja...@confluent.io> wrote:
Hi Chia-Ping,
I think this is a great idea. It is a pity that we cannot continue to use
the `send` verb, but I don't see how we can. I know we considered
`transmit` as another option which is closer to `send`. That would avoid
the redundancy when people choose the common "producer" variable name.
producer.transmit
instead of
producer.produce
A couple alternatives might be `write` or `append`. I'm happy with
`produce` as well, but curious if others have thoughts.
-Jason
On Wed, Jan 20, 2021 at 9:37 AM Chia-Ping Tsai <chia7...@apache.org>
wrote:
Dear all,
I'd like to start the discussion thread for KIP-706:
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=100829459
KIP-706 is proposing to introduce new API "CompletionStage
produce(record)" to Producer. Kafka users can leverage CompletionStage
to
write asynchronous non-blocking code. CompletionStage is more powerful
than
Future and callback. Also, the code using Future and callback can be
easily
re-written by CompletionStage.
Cheers,
Chia-Ping