<p>I have a kubernetes service that only does something when it consumes a message from a Kafka queue. The queue does not have messages very often, and running the service as a job triggered whenever a message is found would save resources.</p>
<p>I see that Kubernetes has this functionality for AMQP-type message services: <a href="https://kubernetes.io/docs/tasks/job/coarse-parallel-processing-work-queue/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/job/coarse-parallel-processing-work-queue/</a></p>
<p>Is there a way to adapt this for Kafka, given that Kafka does not support AMQP? I'd switch to a different messaging system, but I have other services that also read from this queue that require Kafka.</p>

sigma1510
<p>That Kafka consumer <code>Service</code> is all you really need. If you want to save resources, this could be paired with <a href="https://keda.sh/" rel="nofollow noreferrer">KEDA</a> autoscaler such that it scales up and down, depending on load or consumer group lag.</p>
<p>Or you can use serverless platforms such as <a href="https://knative.dev/docs/eventing/sources/kafka-source/" rel="nofollow noreferrer">KNative</a> to trigger based on Kafka (or other messaging systems) events.</p>
<blockquote>
<p>Kafka does not support AMQP</p>
</blockquote>
<p>Kafka Connect <em>should</em> be able to bridge AMQP to Kafka. E.g. Apache Camel has connectors for both.</p>
