Tag Archives: mdb

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 A @Singleton bean fires a producer process which run in … Continue reading

Posted in Java EE | Tagged , , , , , , | 2 Comments

Quick tip: Exception handling in Message Driven Beans

Let’s do a quick review of exceptional handling with regards to Message Driven Beans. The entry point into a MDB is the overridden onMessage method. It does not provide any scope for throwing checked exceptions and as a result, you … Continue reading

Posted in Java, Java EE | Tagged , , , , | Leave a comment

MDB != JMS and vice-versa

Basics A Message Driven Bean (further referred to as MDB) is just another EJB like Stateless, Stateful or a Singleton. It’s specified using the @MessageDriven annotation. MDBs are used for asynchronous message processing They are similar to Stateless EJBs since … Continue reading

Posted in Java, Java EE | Tagged , , , , , , | 1 Comment