Closed softwarevamp closed 5 years ago
That is the point though, because it generates 2 different kafka messages. One for the main kafka topic, and one for the appid kafka topic. Is there different behavior expected here?
Is it reasonable send back conditionally?
if self.appid_topics:
send to appid
else:
send to firehose
You are free to make a fork and change the behavior if you want, but the point of the current setup is to make a topic that "everyone" can subscribe to, and a topic that "only X app" can subscribe to.
https://github.com/istresearch/scrapy-cluster/blob/77129294a0764bf279ea6d5fc2ca26b6df7ab513/crawler/crawling/pipelines.py#L198
when KAFKA_APPID_TOPICS set to True, _kafka_success or _kafka_failure called twice which generates duplicate log entries.