Comsume topic message

Hello Community:
from REST Proxy API v3 or from Confluent Cloud APIs
what is the right command to consume topic’s messages?
can anyone share an example?

I need to consume the message, not produce.

Thanks,

Currently there isn’t a Confluent Cloud API for consuming. You can use the REST Proxy against Confluent Cloud. The “Confluent Cloud” Kafka Setup option here walks through getting started running in Docker. You’d want to look at the v2 API here.

@dtroiano ,Thank you very much for replying my message!
to use REST Proxy API to consume
if there is any V3 API available?
if yes, where to find the documentation?
if no, we have a Coufluent environment on V3, and can I use V2 API to call V3?

Thanks for your time.

Both v2 and v3 APIs are supported in the current latest version of REST Proxy. From here:

The versions of the REST Proxy API are v2 and v3 .

thanks @dtroiano !
i’m sending this API


and received this message:

i’m looking for the Key, Value fields inside of this topic, but not able to get them, what is missing from my API call? do you have any examples?

That looks like the Get Topic Confluent Cloud API, which returns topic metadata but can’t be used to consume record key / values.

This REST Proxy guide here can get you started with consuming from topics in Confluent Cloud via REST. Keep in mind that it requires running REST Proxy. There isn’t currently a hosted API (i.e., under https://pkc-abcde*.confluent.cloud/) that you can use to consume.

got it. @dtroiano
Thanks for those informations!