Rest call from Kafka connect to Google Function

I've set up Kafka in a google instance and was able to run a simple publisher and subscriber using the commands.

Now in the actual task, the producer(from some other team) will be sending messages(JSON data) and I'll have to read those in my code and also call a google function from within my code to process the incoming data.

I did do a fair bit of research online and got to know about Kafka Connect, which I can use to forward messages to Google Pub/Sub which in turn can trigger the google function. However, my architect suggests that the latency involved in forwarding to Pub/Sub can be eliminated by making REST calls. Kafka to Pubsub connect

I'm really new to Kafka(like less than a week of experience) and have no idea how to make REST calls from here. I'm assuming I'll have to write a java code, but can't find any good resource for the same. I think I can do HTTP Triggers like https://cloud.google.com/functions/docs/calling/http for calling the gfunc from my kafka connect code.

Any guidance would be appreciated. Thanks and sorry for any incorrect information :)