SNAS / openbmp

OpenBMP Server Collector
www.openbmp.org
Eclipse Public License 1.0
232 stars 76 forks source link

Allow publication to kafka topics to be selectively disabled #55

Closed alistairking closed 7 years ago

alistairking commented 7 years ago

Any topic name configured to be null (or set to the empty string) will be disabled, and no messages will be published. Disabled topics will not be created in Kafka if they don't already exist. I have tested that disabling all topics does work, though I'm not sure what the point of this would be.

Someone more familiar with the code may/should be able to move the topicEnabled checks into the various update_* methods and save some needless message generation, but some of these methods appear to have side-effects, so I took the safe route and chose to simply not publish messages to disabled topics.