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

Document GRPC starter + Kafka Stream usage #219

Closed
jedvardsson opened this issue Jun 8, 2021 · 7 comments
Closed

Document GRPC starter + Kafka Stream usage #219

jedvardsson opened this issue Jun 8, 2021 · 7 comments
Labels
documentation Auto-generates notes
Milestone

Comments

@jedvardsson
Copy link

Hi, I am having problem starting a spring cloud app using this project when no Kafka is available, which is normal in development. The app will hang until KafkaAdminClient times out after 60 s before the app is fully started.

What happens is that the bean grpcInternalConfigurator which is defined as a Consumer<ServerBuilder<?>> seems to request a Kafka Topic. This is because spring cloud streaming treats beans of Consumer, Supplier and Function as part of their messing system.

I am not sure if the intent of GRpcAutoConfiguration is to depend on this feature. From what I can tell it does not look so, however, I am a novice in this area so I could be wrong.

@jvmlet
Copy link
Collaborator

jvmlet commented Jun 8, 2021

GRpcAutoConfiguration doesn't depend on Kafka. I'll check

This is because spring cloud streaming treats beans of Consumer, Supplier and Function as part of their messing system.

If you could provide the project that reproduces the behavior, it would be great.

@jedvardsson
Copy link
Author

Great, I'll fix a minimal project to reproduce the issue shortly.

@jedvardsson
Copy link
Author

Here is sample project that shows the problem.

https://github.com/jedvardsson/grpc-spring-boot-starter-hangs-waiting-for-kafka-bug

@jvmlet
Copy link
Collaborator

jvmlet commented Jun 9, 2021

Thanks @jedvardsson, I'll have a look

@jvmlet
Copy link
Collaborator

jvmlet commented Jun 16, 2021

@jedvardsson , according to this, we will need to explicitly set the consumer/producer function definitions, no way to mark the Consumer/Produce/Function beans as not eligible for registration.
I'll commit the demo with test for this use case soon

jvmlet pushed a commit that referenced this issue Jun 16, 2021
@jvmlet
Copy link
Collaborator

jvmlet commented Jun 16, 2021

@jedvardsson , this is essential if you have more than 1 Consumer/Producer/Function bean.
Demo test is here

@jvmlet jvmlet changed the title GRpcAutoConfiguration and grpcInternalConfigurator Document GRPC starter + Kafka usage Jun 16, 2021
@jvmlet jvmlet added the documentation Auto-generates notes label Jun 16, 2021
@jvmlet jvmlet added this to the 4.5.4 milestone Jun 16, 2021
@jvmlet jvmlet changed the title Document GRPC starter + Kafka usage Document GRPC starter + Kafka Stream usage Jun 17, 2021
@jvmlet jvmlet closed this as completed in 7d5c71e Jun 17, 2021
@jvmlet
Copy link
Collaborator

jvmlet commented Jun 17, 2021

@jedvardsson ,FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Auto-generates notes
Projects
None yet
Development

No branches or pull requests

2 participants