Multi-kafka for high availability
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- kafka, python
Línea de trabajo
Start by running the provided asyncio example with two from_kafka_batched sources and an a.union(b) sink, then stop one Kafka cluster to reproduce the freeze. Trace the asynchronous Kafka source and union behavior to identify where progress stops. Done means the combined stream continues handling the available cluster when the other cluster is stopped, with coverage for the failure case.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
We are setting up Kafka in multiple data centers to achieve high availability. I expected that Streamz could do a union between both of these clusters. Everything works as expected, but when I stop one of the Kafka clusters, the stream freezes. I'm thinking there is a callback somewhere that is blocking operations?
import asyncio
import confluent_kafka as ck
from streamz import from_kafka_batched
async def produce(broker, cluster_id, topic):
p = ck.Producer({'bootstrap.servers': broker})
for i in range(100000):
p.poll(0)
p.produce(topic, 'cluster-{} value-{}'.format(cluster_id, i))
p.flush(timeout=0.5)
await asyncio.sleep(1)
async def main():
topic = 'test-topic'
args1 = {'bootstrap.servers': 'localhost:9092', 'group.id': 'test-group'}
args2 = {'bootstrap.servers': 'localhost:9093', 'group.id': 'test-group'}
a = from_kafka_batched(topic, args1, npartitions=1, start=True,
asynchronous=True)
b = from_kafka_batched(topic, args2, npartitions=1, start=True,
asynchronous=True)
a.union(b).sink(print)
asyncio.create_task(produce('localhost:9092', 1, topic))
asyncio.create_task(produce('localhost:9093', 2, topic))
while True:
await asyncio.sleep(1)
if __name__ == '__main__':
asyncio.run(main())
- Lenguaje dominante
- Python
- Estrellas
- 1.3k
- Forks
- 149
- Merge medio
- 17 h 39 min
- PR fusionados (30 d)
- 1
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python-streamz/streamz
-
pkg_resources warning Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
python-streamz/streamz#481 · 4 comentarios ·
-
Combining the streamz.Stream.filenames() and streamz.Stream.from_textfile() using dask scatter? Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
python-streamz/streamz#480 · 2 comentarios ·
-
Compile the code into c++ Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
python-streamz/streamz#479 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
python-streamz/streamz#478 · 6 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 10/100
python-streamz/streamz#476 · 17 comentarios · 2 reacciones ·
Todos los issues de python-streamz/streamz
Issues similares
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Abiertoarea: ci bug perceived difficulty: 3
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ClickHouse/clickhouse-connect#1057 ·