Thanks to the recently released Payara Kafka Connector, you can now consume messages from Kafka using Message Driven Beans!
Here is a Docker based example for trying it out. Quick overview
@Singletonbean fires a producer process which run in a managed thread (thanks to Java EE concurrency utilities)
- The Kafka consumer is a Message Driven bean (MDB)
Refer to the README for how to run this