Note that this dependency has scope provided since the types within this
dependency are globally available to every application deployed to Payara Micro
after the KafkaRAR-0.1.0-SNAPSHOT.rar was deployed.

Sending messages

Sending messages to Apache Kafka can be done via the JCA and a Kafka specific
API. In order to start using this API to send messages, a resource has to be
defined via the JCA API; a connection factory.

The connection factory has to be given a name, which can be any name that is
valid for JNDI. The java:app namespace is typically recommended to be used. The
type of the connection factory to be used for Kafka is
fish.payara.cloud.connectors.kafka.KafkaConnectionFactory, and we have to
specify the resource adapter name which is here KafkaRAR-0.1.0-SNAPSHOT.

Receiving messages

Messages can be received from Apache Kafka by creating an MDB (Message Driven
Bean) that implements the fish.payara.cloud.connectors.kafka.api.KafkaListener
marker interface and has one or more methods annotated with @OnRecord and the
method signature void method(ConsumerRecord record), or @OnRecords and the
method signature void method(ConsumerRecords records)