Search in sources :

Example 1 with MessageProcessor

use of org.graylog2.plugin.messageprocessors.MessageProcessor in project graylog2-server by Graylog2.

the class ProcessBufferProcessor method handleMessage.

private void handleMessage(@Nonnull Message msg) {
    msg.addStream(defaultStreamProvider.get());
    Messages messages = msg;
    for (MessageProcessor messageProcessor : orderedMessageProcessors) {
        messages = messageProcessor.process(messages);
    }
    for (Message message : messages) {
        outputBuffer.insertBlocking(message);
    }
}
Also used : Messages(org.graylog2.plugin.Messages) Message(org.graylog2.plugin.Message) MessageProcessor(org.graylog2.plugin.messageprocessors.MessageProcessor)

Aggregations

Message (org.graylog2.plugin.Message)1 Messages (org.graylog2.plugin.Messages)1 MessageProcessor (org.graylog2.plugin.messageprocessors.MessageProcessor)1