Class ConsumePulsar
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.pulsar.AbstractPulsarConsumerProcessor<byte[]>
org.apache.nifi.processors.pulsar.pubsub.ConsumePulsar
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SeeAlso({PublishPulsar.class,ConsumePulsarRecord.class,PublishPulsarRecord.class})
@Tags({"Pulsar","Get","Ingest","Ingress","Topic","PubSub","Consume"})
@CapabilityDescription("Consumes messages from Apache Pulsar. The complementary NiFi processor for sending messages is PublishPulsar.")
@InputRequirement(INPUT_FORBIDDEN)
@WritesAttributes(@WritesAttribute(attribute="message.count",description="The number of messages received from Pulsar"))
public class ConsumePulsar
extends AbstractPulsarConsumerProcessor<byte[]>
-
Field Summary
FieldsFields inherited from class org.apache.nifi.processors.pulsar.AbstractPulsarConsumerProcessor
ACK_TIMEOUT, ASYNC_ENABLED, AUTO_ACK_OLDEST_CHUNKED_ON_QUEUE_FULL, AUTO_UPDATE_PARTITION_INTERVAL, AUTO_UPDATE_PARTITIONS, CONSUMER_BATCH_SIZE, CONSUMER_NAME, EXCLUSIVE, EXPIRE_TIME_OF_INCOMPLETE_CHUNKED_MESSAGE, FAILOVER, KEY_SHARED, MAPPED_FLOWFILE_ATTRIBUTES, MAX_ASYNC_REQUESTS, MAX_PENDING_CHUNKED_MESSAGE, MESSAGE_DEMARCATOR, PRIORITY_LEVEL, PROPERTIES, PULSAR_CLIENT_SERVICE, PULSAR_MESSAGE_KEY, RECEIVER_QUEUE_SIZE, REL_SUCCESS, RELATIONSHIPS, REPLICATE_SUBSCRIPTION_STATE, SHARED, SUBSCRIPTION_INITIAL_POSITION, SUBSCRIPTION_NAME, SUBSCRIPTION_TYPE, TOPICS, TOPICS_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidconsume(org.apache.pulsar.client.api.Consumer<org.apache.pulsar.client.api.schema.GenericRecord> consumer, org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) private voidhandleAsync(org.apache.pulsar.client.api.Consumer<org.apache.pulsar.client.api.schema.GenericRecord> consumer, org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) voidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) Methods inherited from class org.apache.nifi.processors.pulsar.AbstractPulsarConsumerProcessor
cleanUp, consumeAsync, customValidate, getAckPool, getAckService, getConsumer, getConsumerBuilder, getConsumerId, getConsumerPool, getConsumers, getConsumerService, getMappedFlowFileAttributes, getPulsarClientService, getRelationships, getSupportedPropertyDescriptors, init, isSharedSubscription, setAckPool, setAckService, setConsumerPool, setConsumers, setConsumerService, setPulsarClientService, shutDownMethods inherited from class org.apache.nifi.processor.AbstractProcessor
onTriggerMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful
-
Field Details
-
MSG_COUNT
- See Also:
-
-
Constructor Details
-
ConsumePulsar
public ConsumePulsar()
-
-
Method Details
-
onTrigger
public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException - Specified by:
onTriggerin classorg.apache.nifi.processor.AbstractProcessor- Throws:
org.apache.nifi.processor.exception.ProcessException
-
handleAsync
private void handleAsync(org.apache.pulsar.client.api.Consumer<org.apache.pulsar.client.api.schema.GenericRecord> consumer, org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) -
consume
private void consume(org.apache.pulsar.client.api.Consumer<org.apache.pulsar.client.api.schema.GenericRecord> consumer, org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.pulsar.client.api.PulsarClientException - Throws:
org.apache.pulsar.client.api.PulsarClientException
-