GitHub user ogorun opened a pull request:
https://github.com/apache/storm/pull/406
Kafka spout failure config
This pull request offers plugable MessageFailureHandler for failed message.
Solution structure.
PartitionManger uses instance of class that implements
IMassageFailureHandler interface for failure handling.
For instance creation it uses factory object stored in
MessageFailureHandlerFactoryRepository.
This request provides 2 implementations for IMessageFailureHanlder:
- DefaultFailureHandler repeats current KafkaSpout behaviour
- ConfigurableRetriesFailureHandler enables possibility to configure number
of retires per message.
There is also one implementation of IMessageFailureHandlerFactory:
MessageFailureHandlerDefaultFactory that provides possibility to create either
DefaultFailureHandler or ConfigurableRetriesFailureHandler.
By default, if nobody filled MessageFailureHandlerFactoryRepository, it
returns MessageFailureHandlerDefaultFactory object that creates
DefaultFailureHandler object.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/pheed/storm kafkaSpoutFailureConfig
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/406.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #406
----
commit 10b0385d49ec5fa12da89895d55255fa02ae0e99
Author: Olga Gorun <[email protected]>
Date: 2015-01-29T11:14:00Z
Pluggable failure handler with default implementation is added
commit 63b5fd9f26368346ad73fd69389090d1e890cac9
Author: Olga Gorun <[email protected]>
Date: 2015-01-29T13:37:12Z
- rename MessageFailureHandler interface -> IMessageHandler
- new method ack in IMessageInterface
- additional implementation of IMessageInterface:
ConfigurableRetriesFailureHandler
commit bf2e290e65390d901a7f25e87f7044de3e373588
Author: Olga Gorun <[email protected]>
Date: 2015-02-02T12:22:38Z
- set configurable retries as default strategy in
MessageFailureHandlerDefaultFactory
- bug fix: fix type of storm configuration parameter for retry failure
handler
- bug fix: fix default offset returned by both failure strategies
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---