Java Magazine, Jan/Feb 2018
ORACLE COM JAVAMAGAZINE JANUARY FEBRUARY 2018 86 beyond CRUD for ConsumerRecord String CoffeeEvent record records eventConsumer accept record value consumer commitSync public void stop closed set true consumer wakeup After an event has been processed I commit to the consumption by calling commitSync This event consumer is started from both the event handler and the updating consumer Both are then responsible for firing the CDI events See the OrderEventHandler definition shown earlier and the following OrderUpdateConsumer @ Startup @ Singleton public class OrderUpdateConsumer private EventConsumer eventConsumer @ Resource ManagedExecutorService mes @ Inject Properties kafkaProperties @ Inject
You must have JavaScript enabled to view digital editions.