You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please check the given snippet.
Exception throwing properly when no Kafka broker available in the starting stage.
But it's not throwing an exception while disconnecting the Kafka.
from time import sleep
from scrapy_kafka_export.writer import KafkaTopicWriter, \
ScrapyKafkaTopicWriter
item_writer = ScrapyKafkaTopicWriter(
bootstrap_servers="localhost:9092",
topic="my-topic",
batch_size=100,
compression_type=None
)
item = {}
while True:
try:
stats = item_writer.write_item(item)
print(stats)
sleep(5)
except Exception as e:
print(e)
The text was updated successfully, but these errors were encountered:
Please check the given snippet.
Exception throwing properly when no Kafka broker available in the starting stage.
But it's not throwing an exception while disconnecting the Kafka.
The text was updated successfully, but these errors were encountered: