How to make client library work with API

Hello, I saw few client libraries on Confluent’s github, After some tinkering I got a producer working. The producer doesn’t do a lot, it imports the kafka library & sends messages to an already created topic.
I am seeking help in how to make that client work with API? So instead using the endpoint of confluent-kafka-broker:9092, I want to use API endpoint. I am not sure if client libraries have that module built in.
Why would I want to do that?
I am using Confluent’s rest proxy & would like to send messages over RESTful http.
I’d like to hear if something similar has been done before or experimented with. Are there SDKs available from Confluent which developers can simply import & work with?


That’s a great question. As far as I know, all clients expect to work with a Kafka Broker. But here are some resources you may find helpful

If this doesn’t answer your question, please circle back to the forum.


thanks for the response, I have read through those articles before & that’s how I got a rest proxy setup which is in front of Confluent cloud & brokers api connection from client to kafka cluster.
I was looking for a client example that can show use of api calls so instead of using broker address in the code, I could use rest proxy api.
Considering the requirement, I was hoping if Confluent has sdks for developers?

Do you mean an SDK where the clients connect to endpoint instead of a broker? If that’s the case there’s not one that I’m aware of as the clients use a specific protocol. In the Kafka Java API, the Consumer and Producer are interfaces you could conceivably write your own producer/consumer facade that talks to the REST API, but I think that might bit complicated. I’ll take a look though to see if I can find anything.


1 Like

thanks Bill, that’s what I mean. I can’t seem to find anything in examples sdks which allows clients to connect to endpoints, all the client side libraries work with bootstrap.server config. I mean sure that is one way but what if organizations want to implement an abstraction layer for improved experience.

@callumd This blog goes into some details about the REST Proxy API including some example curl commands you could use to get started with client side interactions.

1 Like

thanks @rick I have read that article & few more, they are good to understand Confluent rest proxy & the benefits that comes with it but my question is on client side. So far, I have seen, used & tested different client libraries which uses tcp based connection to Confluent cloud & have requirement for bootstrap.server. I am keen to know if there are client libraries or sdks from Confluent which enables an organization to use rest proxy (restful http connection) endpoint & having an abstraction layer. Writing from scratch is a tedious task & so I’d like to know if something already exists. I am sure this has been brought up before & someone within Confluent might have an answer or some code sample to share.