@InputRequirement(value=INPUT_FORBIDDEN) @Tags(value={"listen","relp","tcp","logs"}) @CapabilityDescription(value="Listens for RELP messages being sent to a given port over TCP. Each message will be acknowledged after successfully writing the message to a FlowFile. Each FlowFile will contain data portion of one or more RELP frames. In the case where the RELP frames contain syslog messages, the output of this processor can be sent to a ParseSyslog processor for further processing.") @WritesAttribute(attribute="relp.command",description="The command of the RELP frames.") @WritesAttribute(attribute="relp.sender",description="The sending host of the messages.") @WritesAttribute(attribute="relp.port",description="The sending port the messages were received over.") @WritesAttribute(attribute="relp.txnr",description="The transaction number of the message. Only included if <Batch Size> is 1.") @WritesAttribute(attribute="mime.type",description="The mime.type of the content which is text/plain") @SeeAlso(value=ParseSyslog.class) public class ListenRELP extends AbstractListenEventBatchingProcessor<RELPEvent>
Modifier and Type | Class and Description |
---|---|
static class |
ListenRELP.RELPAttributes |
AbstractListenEventBatchingProcessor.FlowFileEventBatch
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor |
CLIENT_AUTH |
private RELPEncoder |
relpEncoder |
static PropertyDescriptor |
SSL_CONTEXT_SERVICE |
MAX_BATCH_SIZE, MESSAGE_DELIMITER, messageDemarcatorBytes
charset, CHARSET, descriptors, dispatcher, errorEvents, events, MAX_CONNECTIONS, MAX_MESSAGE_QUEUE_SIZE, MAX_SOCKET_BUFFER_SIZE, POLL_TIMEOUT_MS, port, PORT, RECV_BUFFER_SIZE, REL_SUCCESS, relationships
Constructor and Description |
---|
ListenRELP() |
Modifier and Type | Method and Description |
---|---|
protected ChannelDispatcher |
createDispatcher(ProcessContext context,
BlockingQueue<RELPEvent> events) |
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
protected List<PropertyDescriptor> |
getAdditionalProperties() |
protected Map<String,String> |
getAttributes(AbstractListenEventBatchingProcessor.FlowFileEventBatch batch) |
protected String |
getBatchKey(RELPEvent event) |
protected String |
getTransitUri(AbstractListenEventBatchingProcessor.FlowFileEventBatch batch) |
void |
onScheduled(ProcessContext context) |
protected void |
postProcess(ProcessContext context,
ProcessSession session,
List<RELPEvent> events) |
protected void |
respond(RELPEvent event,
RELPResponse relpResponse) |
getBatches, init, onTrigger
createBufferPool, getAdditionalRelationships, getDispatcherPort, getErrorQueueSize, getLongPollTimeout, getMessage, getQueueSize, getRelationships, getSupportedPropertyDescriptors, onUnscheduled
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public static final PropertyDescriptor SSL_CONTEXT_SERVICE
public static final PropertyDescriptor CLIENT_AUTH
private volatile RELPEncoder relpEncoder
protected List<PropertyDescriptor> getAdditionalProperties()
getAdditionalProperties
in class AbstractListenEventProcessor<RELPEvent>
@OnScheduled public void onScheduled(ProcessContext context) throws IOException
onScheduled
in class AbstractListenEventBatchingProcessor<RELPEvent>
IOException
protected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate
in class AbstractConfigurableComponent
protected ChannelDispatcher createDispatcher(ProcessContext context, BlockingQueue<RELPEvent> events) throws IOException
createDispatcher
in class AbstractListenEventProcessor<RELPEvent>
IOException
protected String getBatchKey(RELPEvent event)
getBatchKey
in class AbstractListenEventBatchingProcessor<RELPEvent>
protected void postProcess(ProcessContext context, ProcessSession session, List<RELPEvent> events)
postProcess
in class AbstractListenEventBatchingProcessor<RELPEvent>
protected void respond(RELPEvent event, RELPResponse relpResponse)
protected Map<String,String> getAttributes(AbstractListenEventBatchingProcessor.FlowFileEventBatch batch)
getAttributes
in class AbstractListenEventBatchingProcessor<RELPEvent>
protected String getTransitUri(AbstractListenEventBatchingProcessor.FlowFileEventBatch batch)
getTransitUri
in class AbstractListenEventBatchingProcessor<RELPEvent>
Copyright © 2020 Apache NiFi Project. All rights reserved.