You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jan Bednar (JIRA)" <ji...@apache.org> on 2019/05/26 15:57:00 UTC

[jira] [Commented] (CAMEL-10540) GROK Parser

    [ https://issues.apache.org/jira/browse/CAMEL-10540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16848471#comment-16848471 ] 

Jan Bednar commented on CAMEL-10540:
------------------------------------

Is anyone working on this? I have this implemented as Processor in one project and I would like to refactor it to component. 

There are few things in which I need hear your opinions:
 * In the comments above there is example with marshal(). I think, this should implement unmarshal() instead (converting String to Object)
 * Grok is "one way" dataformat. Is there any standardized way how to handle this? Or is it OK to throw UnsupportedOperationException from marshal() method?
 * I would like to to implement pluggable custom pattern registration, Is it OK to do registry lookup in doStart method, or is there a better place? I mean somethink like 
{code:java}
@Override
protected void doStart() throws Exception {
    for (GrokPattern customPattern : getCamelContext().getRegistry().findByType(GrokPattern.class)) {
        customPatterns.put(customPattern.getName(), customPattern.getPattern());
    }
}
{code}
 

> GROK Parser
> -----------
>
>                 Key: CAMEL-10540
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10540
>             Project: Camel
>          Issue Type: New Feature
>            Reporter: Jan Bernhardt
>            Priority: Major
>             Fix For: Future
>
>
> As discussed on the mailing list [1], it would be great to have a grok filter for camel, to parse text with multiple named regex expressions resulting in a Map containing the named key as well as the parsed value.
> [1] http://camel.465427.n5.nabble.com/Parsing-unstructured-Text-in-Camel-td5790513.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)