简体   繁体   English

在 Kafka 中调度作业

[英]Scheduling jobs in Kafka

I am currently working on an application which will schedule a task as a timers.我目前正在开发一个将任务安排为计时器的应用程序。 The timers can be run on any day of the week with the configuration by the user.定时器可以根据用户的配置在一周中的任何一天运行。 Currently it is implemented with bullqueue and redis for storage.目前使用bullqueue和redis实现存储。 Once the timer will execute it will execute an event and further process the business logic.一旦计时器执行,它将执行一个事件并进一步处理业务逻辑。 There can be thousands of queue messages in the redis. redis 中可以有数千条队列消息。

I am looking to replace redis with Kafa as I have read it is easy to scale and guarantee of no message loss.我希望用 Kafa 替换 redis,因为我读过它很容易扩展并且保证不会丢失消息。

The question is.问题是。 Is it a good idea to go with Kafa?和卡法一起去是个好主意吗? If yes then how can we schedule a jobs in kafka with the combination of bullqueue.如果是,那么我们如何结合 bullqueue 在 kafka 中安排工作。 I am new to Kafka and still trying to understand how can we schedule the jobs in Kafka or is it a good architecture setup to go with.我是 Kafka 的新手,仍在尝试了解我们如何安排 Kafka 中的作业,或者它是否是一个很好的架构设置。

My current application setup is with nestjs, nodejs我当前的应用程序设置是使用 nestjs、nodejs

Kafka doesn't have any feature like this built-in, so you'd need to combine it with some other timer/queue system for scheduling a KafkaProducer action. Kafka 没有任何内置的功能,因此您需要将它与其他一些计时器/队列系统结合起来以安排KafkaProducer操作。

Similarly, Kafka Consumers are typically always running, although, you can start/pause them periodically as well.同样,Kafka 消费者通常总是在运行,但您也可以定期启动/暂停它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 基于事件的Kafka+调度设计 - Event Based Kafka + Scheduling Design Kafka用例替换控制M作业 - Kafka use case to replace control M jobs 在Mesos上运行多个Kafka经纪人作为马拉松工作 - Running multiple Kafka brokers on Mesos as Marathon jobs kafka-flink:Kafka生产者错误,取决于flink作业 - kafka-flink : Kafka producer error depending on flink jobs 通过流作业和Kafka增加HDFS流量中的网络负载 - Increasing network load in HDFS traffic with stream jobs and Kafka FAIR调度模式能否使Spark Streaming作业从并行运行的不同主题读取? - Could FAIR scheduling mode make Spark Streaming jobs that read from different topics running in parallel? 关于多个 Spark 流作业使用一个具有相同组 ID 的 kafka 主题的问题 - Question about multiple spark streaming jobs consume one kafka topic with same group id 在Kafka Streams作业中执行数据库同步查询或静态调用是一种好习惯吗? - Is it a good practice to do sync database query or restful call in Kafka streams jobs? 由于 kafka log4jappender 在启动纱线作业时出现异常 - Getting exception while launching yarn jobs due to kafka log4jappender Spark Kafka Structured Streaming:问题 - 对日志的并发更新。 检测到多个流作业 - Spark Kafka Structured Streaming: Issue - Concurrent update to the log. Multiple streaming jobs detected
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM