Skip to content

Use NettyChannelBuilder to enable blocking calls in callbacks#1559

Open
cbornet wants to merge 1 commit intoetcd-io:mainfrom
cbornet:use-grpc-netty
Open

Use NettyChannelBuilder to enable blocking calls in callbacks#1559
cbornet wants to merge 1 commit intoetcd-io:mainfrom
cbornet:use-grpc-netty

Conversation

@cbornet
Copy link

@cbornet cbornet commented Jan 22, 2026

It's currently not possible to do blocking calls in listener handlers while preserving back-pressure as that blocks the vertx event loop (see #1089 #1285).
Instead of VertxChannelBuilder, we can use NettyChannelBuilder delegates onNext/onError/onCompleted to a thread-pool with ordering guarantees.
It is OK to do it as the vertx-grpc stubs are just wrappers around the grpc-java ones and don't actually use the vertx loop. So they are compatible with any ManagedChannelBuilder (eg. in unit tests InProcessChannelBuilder is used).

Alternatives:

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cbornet
Once this PR has been reviewed and has the lgtm label, please assign lburgazzoli for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

NettyChannelBuilder delegates onNext/onError/onCompleted to a thread-pool with ordering guarantees.
It makes it possible to block in jetcd callbacks which is not possible with VertxChannelBuilder as that
blocks the vertx event loop.

Signed-off-by: cbornet <cbornet@hotmail.com>
@cbornet cbornet changed the title Use NettyChannelBuilder Use NettyChannelBuilder to enable blocking calls in callbacks Jan 23, 2026
@cbornet
Copy link
Author

cbornet commented Feb 9, 2026

Hi @lburgazzoli, would you have time to review ?

@lburgazzoli
Copy link
Collaborator

hope by the end of the week, please ping me again in case I won't

@cbornet
Copy link
Author

cbornet commented Feb 27, 2026

hope by the end of the week, please ping me again in case I won't

Hi @lburgazzoli, gentle ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants