salesforce / storm-dynamic-spout

A framework for building spouts for Apache Storm and a Kafka based spout for dynamically skipping messages to be processed later.
BSD 3-Clause "New" or "Revised" License
40 stars 13 forks source link

Use a factory to create VirtualSpout instances #71

Closed stanlemon closed 6 years ago

stanlemon commented 6 years ago

IMO this is related to #70 as you can tell by some of the naming weirdness.

FactoryManager doesn't have any facilities for passing arguments to a constructor, which is why it was not used to create the VirtualSpoutFactory.

I have mixed feelings about the generics in DelegateSpoutFactory, in the end if this is not done we wind up casting, so I think this is a better option honestly.

Note that right now the FilterChain is part of VirtualSpout and not of DelegateSpout, I think this is worth calling out because it is the primary reason why someone would want to directly type against VirtualSpout today. Perhaps we should reconsider this, I'm open to this - we just need to make a decision that the FilterChain is a first class citizen in the interface and that we expect implementations to utilize this.