# Pipeline processing continues after messages getting dropped in previous stage of pipeline

**URL:** <https://community.graylog.org/t/pipeline-processing-continues-after-messages-getting-dropped-in-previous-stage-of-pipeline/13023>\
**Category:** Graylog Central (peer support)\
**Tags:** pipeline-rules, route-to-streampl\
**Created:** [December 2, 2019, 9:34am UTC](https://community.graylog.org/t/pipeline-processing-continues-after-messages-getting-dropped-in-previous-stage-of-pipeline/13023 "2019-12-02T09:34:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@Ganeshbabu](https://community.graylog.org/u/Ganeshbabu)\
**Post date:** [December 2, 2019, 9:34am UTC](https://community.graylog.org/t/pipeline-processing-continues-after-messages-getting-dropped-in-previous-stage-of-pipeline/13023/1 "2019-12-02T09:34:32Z")

</div>

Hi All,

We are using Graylog 3.1.1, Elasticsearch 6.8.1 & Mongo 3.6.13 versions in our environment. I have multiple stages in graylog pipeline rules,

**First stage,**

In stage-1 I am trying to get id from lookup table and assigning the value to the field “lookupValue”

```
rule "lookupValue"
when
    to_string($message.logType) == "filebeat"
then
  let host = to_string($message.hostname);
  let id = lookup_value("lookupfilebeat", host);
  set_field("lookupValue", id);
end

```

**Second stage**

In stage-2 if my lookupValue is equals to the value from the current msg then I am dropping the entire message itself.

```
rule "drop_lookup_Value"
when 
    to_string($message.Value) == to_string($message.lookup_Value)
then
	drop_message();
end

```

**Third stage**

In stage-3 if my Value field and lookup\_Value is not same then I am creating new msg and routing it to different stream but now **the problem is though the messages are getting dropped in stage 2 but pipeline is processing the dropped messages in stage3 and new message are getting pushed to testbeat stream and ideally the message should not pass through the next stage if it gets dropped in previous stage.**

Please correct me if I am doing anything wrong in pipeline rules and let me know your thoughts.

```
rule "route-to-stream"
when
    to_string($message.Value) != to_string($message.lookup_Value)
then
 	let msg = create_message("", "");
    let hostname = to_string($message.hostname);
    let LABEL = "HOST";
    set_field("LABEL", LABEL, "", "", msg);
    set_field("id", hostname, "", "", msg);
    route_to_stream("testbeat", "", msg);
end

```

Thanks,  
Ganeshbabu R

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [December 13, 2019, 4:37pm UTC](https://community.graylog.org/t/pipeline-processing-continues-after-messages-getting-dropped-in-previous-stage-of-pipeline/13023/2 "2019-12-13T16:37:21Z")

</div>

just for reference.

this is a known bug with an github issue: [https://github.com/Graylog2/graylog2-server/issues/4855](https://github.com/Graylog2/graylog2-server/issues/4855)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [December 27, 2019, 4:37pm UTC](https://community.graylog.org/t/pipeline-processing-continues-after-messages-getting-dropped-in-previous-stage-of-pipeline/13023/3 "2019-12-27T16:37:22Z")

</div>

Closed on December 27, 2019, 4:37pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
