Closed sunshine69 closed 3 years ago
Hello @sunshine69!
Your usage looks correct, and the errors you are getting appear to be runtime errors, which would indicate that there is a problem with the configuration of the Kafka cluster.
Did the de21197.datafabric.api.request.logic.orchestrator
topic exist in the cluster you were connecting to?
Hi,
the last code is expected as topic does not really exists. the complain is that why the first code snippet does not work?
so if I construct an address and pass to client the client does not auto dial to the server if connection is not yet establish. this is confusing, I would think it should do that as the first code is more intuitive.
the second code works as we already connect using that address from the connection and pass to client. That is a bit not intuitive.
my opinion is we should fix it in the first case so it works. but I move to another project now so have no time for it.
thanks a lot for your reply - all the best.
Describe the solution you'd like A new pr merged recently allow the use the kafka.Client but the use is confusing.
I am trying to use the new Client to do something please see the code snippet below
That code does not trigger any build failure. Means good? But no. Run it I got
So it looks like the Client is constructed but it never call Dial when we use it. That is confusing because if you allow to use of the Client alone it should be able to do it.
In short if my code compiles then it should work. Otherwise hide it as private and prevent the use of it in the first instance.
So I modify the code into this below
And it seems to do something whihc is expected.
Now I don't know if this is the correct usage of Client I am not sure if it is correct?
Supporting documentation