In general, it's not recommended to call external APIs. Instead, you
should try to get the external data into a TABLE in ksqlDB and do a
stream-table join. Not sure if this would be possible for you use case.

It might be possible to write a UDF though... But given that the
external call might fail, and you should not "block" inside the UDF it's
would be a brittle approach.

Using Kafka Streams would give you more flexibility to do an external
API can and handle failed requests and retries.


-Matthias


On 5/5/21 9:53 AM, Greer, Andrew C wrote:
> Hello,
> 
> I am looking for options to call an external API within KSQL. My goal is to 
> connect a Stream to a topic containing message data, call an API using some 
> of that data, then produce updated data to new topics. Is there a known way 
> for doing this? If not, any alternatives?
> 
> Thank you for any future help,
> 
> Andrew
> 
> 

Reply via email to