@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 AbstractProcessor
| Modifier and Type | Class and Description |
|---|---|
static class |
ListenRELP.RELPAttributes |
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
CLIENT_AUTH |
protected List<PropertyDescriptor> |
descriptors |
protected BlockingQueue<RELPMessage> |
errorEvents |
protected EventBatcher |
eventBatcher |
protected BlockingQueue<RELPMessage> |
events |
protected EventServer |
eventServer |
protected byte[] |
messageDemarcatorBytes |
protected int |
port |
static Relationship |
REL_SUCCESS |
protected Set<Relationship> |
relationships |
static PropertyDescriptor |
SSL_CONTEXT_SERVICE |
| Constructor and Description |
|---|
ListenRELP() |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor SSL_CONTEXT_SERVICE
public static final PropertyDescriptor CLIENT_AUTH
public static final Relationship REL_SUCCESS
protected List<PropertyDescriptor> descriptors
protected Set<Relationship> relationships
protected volatile int port
protected volatile BlockingQueue<RELPMessage> events
protected volatile BlockingQueue<RELPMessage> errorEvents
protected volatile EventServer eventServer
protected volatile byte[] messageDemarcatorBytes
protected volatile EventBatcher eventBatcher
@OnScheduled public void onScheduled(ProcessContext context) throws IOException
IOExceptionpublic int getListeningPort()
@OnStopped public void stopped()
protected void init(ProcessorInitializationContext context)
init in class AbstractSessionFactoryProcessorprotected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponentpublic final Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorpublic List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprivate void configureFactoryForSsl(ProcessContext context, NettyEventServerFactory eventFactory)
protected Map<String,String> getAttributes(FlowFileEventBatch batch)
protected String getTransitUri(FlowFileEventBatch batch)
public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprivate void processEvents(ProcessSession session, Map<String,FlowFileEventBatch> batches)
private String getRELPBatchKey(RELPMessage event)
private EventBatcher getEventBatcher()
private NettyEventServerFactory getNettyEventServerFactory(InetAddress hostname, int port, Charset charset, BlockingQueue events)
private String getMessageDemarcator(ProcessContext context)
Copyright © 2023 Apache NiFi Project. All rights reserved.