
David Beavon (Software) asked a question.
I was able to find a few kafka examples, but not much in the way of authentication.
The auth flow I need to use is fairly complex, because it starts with the need to generate a bearer token for Databricks, (and for certain topics/tables within Databricks).
I can get the bearer token myself. But there is apparently no way to provide this to the kafka message producer in ABL. For many other languages/clients there should be a callback method that would be invoked, and that is the place where I would provide the bearer token that is acceptable by Databricks.
We need a lot more kafka examples. The examples I found seem to imply that the broker doesn't authenticate a client at all. I think there should be an example to show how to provide an ad-hoc bearer token (oauth access token) as well.
I'm pretty much stuck at this point. To make matters worse, the LLMs like gemini are hallucinating very badly when it comes to using kafka in ABL. They keep assuming that ABL will have the right classes/enums/callbacks, but that is not the case. So we are made to chase a lot of wild geese, before giving up.
Here is a bunch of hallucination from Gemini showing how one might provide an oauth access token to this API in ABL
You can pass any string based configuration item (and all kafka configuration is via strings) through to the construction the kafka producer from the ABL. call <ProducerBuilder>:SetProducerOption("...kafka config name...", "<bearertokenstring>"). . You'll need to now the configuration value name. There's no callback implemented in ABL for refresh tokens. This needs a feature request.
The list of kafka configuration properties are here. https://docs.confluent.io/platform/current/clients/librdkafka/html/md_CONFIGURATION.html Pick out the ones that apply to the producer. The ABL just passes them through.