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
- A
@Singleton
bean 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
Cheers!
Hi there,
I cant get kafka-jca-api-0.2.0-SNAPSHOT working on wildfly.
I’m trying to reproduce the scenario without docker, but I’m getting this error:
02:04:24,083 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0208: Stopped subdeployment (runtime-name: MOM_KAFKA_MDB.jar) in 16ms
02:04:24,085 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment MOM_KAFKA_MDB_EAR.ear (runtime-name: MOM_KAFKA_MDB_EAR.ear) in 18ms
02:04:24,086 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of “MOM_KAFKA_MDB_EAR.ear” (runtime-name: “MOM_KAFKA_MDB_EAR.ear”)
02:04:24,181 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0207: Starting subdeployment (runtime-name: “MOM_KAFKA_MDB.jar”)
02:04:24,230 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads – 2) WFLYCTL0013: Operation (“full-replace-deployment”) failed – address: ([]) – failure description: {“WFLYCTL0180: Services with missing/unavailable dependencies” => [“jboss.deployment.subunit.\”MOM_KAFKA_MDB_EAR.ear\”.\”MOM_KAFKA_MDB.jar\”.component.KafkaMDB.CREATE is missing [jboss.ra.\”kafka-rar-0.2.0-SNAPSHOT.jar\”]”]}
02:04:24,256 INFO [org.jboss.as.server] (DeploymentScanner-threads – 2) WFLYSRV0016: Replaced deployment “MOM_KAFKA_MDB_EAR.ear” with deployment “MOM_KAFKA_MDB_EAR.ear”
02:04:24,257 INFO [org.jboss.as.controller] (DeploymentScanner-threads – 2) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit.”MOM_KAFKA_MDB.jar”.POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit.”MOM_KAFKA_MDB.jar”.POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment “MOM_KAFKA_MDB.jar”
service jboss.deployment.unit.”payara-kafka-mdb.war”.POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit.”payara-kafka-mdb.war”.POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment “payara-kafka-mdb.war”
service jboss.ra.deployer.”kafka-rar-0.2.0-SNAPSHOT.rar”: org.jboss.msc.service.StartException in service jboss.ra.deployer.”kafka-rar-0.2.0-SNAPSHOT.rar”: WFLYJCA0046: Failed to start RA deployment [kafka-rar-0.2.0-SNAPSHOT.rar]
How can I solve this situation.
Thanks in advance.
António Oliveira
LikeLike
Antonio
I would recommend posting this an issue on the Payara Cloud Connectors project – https://github.com/payara/Cloud-Connectors/issues
LikeLike