-
Notifications
You must be signed in to change notification settings - Fork 6
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
Rebus.Kafka in .Net core Web API #5
Comments
@hotamkushwah - Just to note that I had no problems with Rebus.Kafka up to version 1.4.3, but since then I get the same error as you. It may be worth comparing that version to see if it works; if so, it is presumably a bug in the more recent versions... |
I have checked with version 1.4.3 but still getting same error. I have to use kafka as transport but due to this error not able to do it so now I am exploring the same with mass transit. |
I will not be able to verify this error for the next 2 weeks. |
I have tried with older version up to 1.4.2 but getting same error. |
@glazkovalex - Just to add that I had no issues with 1.4.3, but later versions have not worked for me. |
|
@hotamkushwah, I wrote a test to reproduce your case, but without the WebAPI. I'm sure it doesn't matter in which application the bus is registered, in the console or WebAPI. This test works correctly for me. You can see for yourself. To run the test, you must have Docker Desktop installed. You probably have something wrong with the infrastructure or with the Apahe Kafka instance. When sending a message, the transport checks whether the consumer's subscription to the queue has already completed initialization. If this subscription is not completed yet and does not complete in 30 seconds, then this exeption is returned. If in your case the consumer subscription takes longer than 30 seconds, then before the first sending to the bus, you can handle this exception, and wait for the end of the subscription of your consumer to the queue in the loop. Just in case, in the new version 1.5.4 I increase the wait time for initialization to complete to five minutes to make the transport more patient to wait for the consumer's queue subscription to complete. And also added to the recommendations for waiting for the end of the consumer's subscription to the queue in the message of this exception. |
@hotamkushwah, a similar question was discussed in the next topic Usage of Confluent 1.5.3 causes topic creation issues. There, the problem was in a specific type of images with Apache Kafka, in particular in Strimzi, in which, on the strong recommendation of the community, automatic topics creation is DISABLED by default on the server side. Also, the Confluence.Kafka library, which is used in this Rebus.Kffka transport, since version 1.5.3 does not allow you to use the atomic creation of topics on some images with Apache Kafka, for example, Strimzi. |
I am trying to use Rebus.Kafka in .Net core Web API. I tried to do by register it in startup.cs but it always throw "The transport initialization procedure is still incomplete. There is no confirmation of completion of the subscription to the input queue".
Code is like this :
services.AddRebus(configure => configure
.Transport(t => t.UseKafka("localhost:9092", "MainQueue",producerConfig,consumerConfig))
.Routing(r =>
{
r.TypeBased()
.MapAssemblyOf(MainQueue)
})
The text was updated successfully, but these errors were encountered: