Streaming inferencing

How can I integrate a fastai model into a streaming data pipeline which is running on Apache Spark or Apache Flink? I.e. when the Model (needs the last couple of hours of the stream (for each key) as the input?

Should the fastai model be converted to ONNX?