Consume from Kafka topics using Message Driven Beans

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

Refer to the README for how to run this

Cheers!

Advertisements

About Abhishek

Loves Java EE, distributed KV stores and messaging systems. Frequently blogs at abhirockzz.wordpress.com as well as simplydistributed.wordpress.com. Oh, I have also authored a few (mini) books, articles, Refcards etc. :-)
This entry was posted in Java EE and tagged , , , , , , . Bookmark the permalink.

2 Responses to Consume from Kafka topics using Message Driven Beans

  1. António Oliveira says:

    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

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s