opensearch-project / opensearch-project/data-prepper

Acknowledgements support in Drop processor

Open
#3,279 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
374
Forks
354
Avg merge
3d 18h
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.
Acknowledgements are not received by sources (such as S3/Kafka) if a pipeline has drop processor to conditionally drop events and has "acknowledgements" enabled.

Additional context
This was tested with following pipeline config. Kafka source did not receive acknowledgements for dropped events and did not commit offsets for consumed records.

version: "2"
kafka-pipeline:
  source:
    kafka:
      acknowledgments: true
      topics:
        - name: "test-drop"
          group_id: "Mac-group"
          serde_format: "json"
          auto_offset_reset: "earliest"
      aws:
        msk:
          arn: "arn:aws:kafka:us-west-2:388303208821:cluster/gameday-cluster/8cae81cb-3b38-4b59-8f47-cadee5a804f0-6"
          broker_connection_type: "public"
        sts_role_arn: "arn:aws:iam::388303208821:role/pipeline-to-domain-role"
        region: "us-west-2"
      authentication:
        sasl:
          aws_msk_iam: "role"
  buffer:
    bounded_blocking:
      batch_size: 125000
      buffer_size: 1000000
  processor:
    - grok:
        match:
          message: ['%{IPORHOST:clientip} \[%{HTTPDATE:timestamp}\] %{NUMBER:response_status:int}']
    - drop_events:
        drop_when: '/response_status >= 900'
  sink:
    - stdout:

Sample logs in kafka topic:

{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 400"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 300"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}
{"message": "127.0.0.1 198.126.12 [10/Oct/2000:13:55:36 -0700] 200"}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the drop_events processor and the acknowledgements path used by the Kafka source, using the pipeline configuration and sample records in this issue. Reproduce the case with acknowledgements enabled and verify that dropped events are acknowledged and consumed Kafka records have their offsets committed.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java, kafka
Domain
data-engineering, stream-processing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.