Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 53][PulsarSpout] Adds DLQ support in PulsarSpout of the Storm adaptor #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AnuragReddy2000
Copy link
Owner

Fixes apache#53

Motivation

The current implementation of the Storm adaptor does not utilise the dead letter queue functionality of Pulsar. Often it may be desired that when there is some error while processing a message in the Storm topology, the message be moved into the dead letter queue so that it can be handled separately. But the PulsarSpout currently keeps retrying for a while & finally just drops the message by acking it, which leads to data loss. This PR seeks to allow users of PulsarSpout to opt in to using DLQ queues for message processing failures.

Modifications

  1. Added a method negativeAcknowledge to the PulsarSpoutConsumer interface & added the implementation for the same in the SpoutConsumer class.
  2. Added a boolean attribute negativeAckFailedMessagesEnabled in the PulsarSpoutConfiguration class along with getter & setters for the same.
  3. Created a new class, PulsarSpoutDeadLetterPolicy which has the same attributes & functionality as the DeadLetterPolicy class exposed by the Pulsar library. This is primarily done to get around the fact that the DeadLetterPolicy class is not serialisable.
  4. Modified the fail, open & mapToValueAndEmit in the PulsarSpout class to implement the DLQ functonality

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: yes
  • The schema: don't know
  • The default values of configurations: no
  • The wire protocol: no
  • The rest endpoints: no
  • The admin cli options: bo
  • Anything that affects deployment: don't know

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? I couldn't find the documentation for the pulsar storm adaptor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeadLetterPolicy in Apache Pulsar Storm Adapter Not implemented
1 participant