New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

kafka-scheduler

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kafka-scheduler

Schedule Kafka messages on your descired topic

latest
Source
npmnpm
Version
0.0.7
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

Kafka Scheduler

Schedule Kafka messages on your desired topic.

  • Time used for topic:
    • Topic1: (startTime * coef^1),
    • Topic2: (startTime *coef^2),
    • Topicn: (startTime * coef^n) n=>step
  • New Topics naming will be: ${prefix}_reschedule_${time}
  • Default precision: 60 seconds

-- Initialize topics

await init(kafkaConfig: KafkaConfig, schedulerConfig: KafkaScheduleConfig)

-- Config

export  interface  KafkaScheduleConfig {
    startTime?: number; // Starting time
    step?: number; // Number of topics created
    coef?: number; // Coeficient for time increasing
    prefix?: string; // Topic name prefix
}

-- Schedule message

	/**
	* @param  {KafkaMessage || Message}  message A raw or new message
	* @param  {string}  topic Message Topic
	* @param  {number}  retryAfter Time in seconds
	*/
  await scheduleMessage(message: RescheduleMessage, topic: string, retryAfter: number) {

Keywords

kafka

FAQs

Package last updated on 02 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts