Package org.jbpm.event.emitters.kafka
Class KafkaEventEmitter
- java.lang.Object
-
- org.jbpm.event.emitters.kafka.KafkaEventEmitter
-
- All Implemented Interfaces:
AutoCloseable,org.jbpm.persistence.api.integration.EventEmitter
public class KafkaEventEmitter extends Object implements org.jbpm.persistence.api.integration.EventEmitter
Kafka implementation of EventEmitter that simply pushes out data to several Kafka topics depending on InstanceView type. Expects following parameters to configure itself - via system properties- org.kie.jbpm.event.emitters.kafka.date_format - date and time format to be sent to Kafka - default format is yyyy-MM-dd'T'HH:mm:ss.SSSZ
- org.kie.jbpm.event.emitters.kafka.bootstrap.servers - Kafka server ip, default is localhost:9092
- org.kie.jbpm.event.emitters.kafka.client.id - Kafka client id
- org.kie.jbpm.event.emitters.kafka.acks - Kafka acknowledge policy, check Kafka documentation
- org.kie.jbpm.event.emitters.kafka.topic.
. Topic name for subscribing to these events. Defaults are "jbpm- -events"
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringKAFKA_EMITTER_PREFIX
-
Constructor Summary
Constructors Constructor Description KafkaEventEmitter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)voidclose()voiddeliver(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)voiddrop(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)protected static Map<String,Object>getProducerProperties()org.jbpm.persistence.api.integration.EventCollectionnewCollection()
-
-
-
Field Detail
-
KAFKA_EMITTER_PREFIX
protected static final String KAFKA_EMITTER_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
deliver
public void deliver(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
- Specified by:
deliverin interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
apply
public void apply(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
- Specified by:
applyin interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
drop
public void drop(Collection<org.jbpm.persistence.api.integration.InstanceView<?>> data)
- Specified by:
dropin interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
newCollection
public org.jbpm.persistence.api.integration.EventCollection newCollection()
- Specified by:
newCollectionin interfaceorg.jbpm.persistence.api.integration.EventEmitter
-
-