Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka reference guide #18085

Merged
merged 1 commit into from
Jul 9, 2021
Merged

Conversation

ozangunalp
Copy link
Contributor

@ozangunalp ozangunalp commented Jun 22, 2021

Transform Getting started to Reference Guide

  • Remove example application to a separate getting started guide: Getting started guide for smallrye-reactive-messaging-kafka #17830
  • Receiving messages: method signatures, acknowledgments & commit strategies, error handling, consumer groups, blocking processing, consumer rebalance listener
  • Sending messages: method signatures, message acknowledgment, backpressure, retries, in-memory channels, broadcasting
  • Processing messages
  • Accessing Kafka clients directly
  • Serialization JSON
  • Health Checks
  • Message compression
  • Authentication
  • Testing applications
  • Kubernetes service binding
  • Configuration reference

Links to other guides : Avro Serialization & Schema Registry, Kafka Streams, Dev Services

@ozangunalp ozangunalp marked this pull request as ready for review July 7, 2021 15:54
docs/src/main/asciidoc/kafka.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/kafka.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/kafka.adoc Show resolved Hide resolved
docs/src/main/asciidoc/kafka.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/kafka.adoc Outdated Show resolved Hide resolved
In the absence of acknowledgment, the processing is considered on error.
If the consumer method receives a `Record` or a payload, the message will be acked on method return, also known as `Strategy.POST_PROCESSING`.
If the consumer method returns another reactive stream or `CompletableStage`, the message will be acked when the downstream message is acked.
// No, it will be ack then the produced message get acked -> Needs confirmation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

You can also remove the limit of in-flight messages by setting `max-inflight-messages` to `0`.
However, note that the Kafka Producer may block if the number of requests reaches `max.in.flight.requests.per.connection`.

=== Retries
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be under the producing message section?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can rename this section to "Retrying message dispatch" and keep it here. I was thinking of adding the "Retrying processing" section near receiving messages/error handling. What do you think ?

docs/src/main/asciidoc/kafka.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/kafka.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/kafka.adoc Outdated Show resolved Hide resolved
Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there! Two remaining comments.

docs/src/main/asciidoc/kafka.adoc Show resolved Hide resolved

For example, if you need to send a message to a stream, from inside a REST endpoint, when receiving a POST request.
In this case, you cannot use `@Outgoing` because your method has parameters.
== Accessing Kafka clients directly
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an anchor as this should be referenced from the getting started guide.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the reference to the getting started guide

@cescoffier
Copy link
Member

@ozangunalp can you squash your commits?

@ozangunalp
Copy link
Contributor Author

@cescoffier done

@cescoffier cescoffier merged commit ba955f2 into quarkusio:main Jul 9, 2021
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants