rxjs-kafkajs
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

rxjs-kafkajs

rxjs + kafkajs

npm Coverage Status

Usage

import { RxKafka } from 'rxjs-kafkajs';

const rxKafka = new RxKafka({
	brokers: [
		`localhost:9092`,
	],
});

const observable = rxKafka.consumeMergeMapProduce({
	groupId: 'group',
	transactionalId: 'transactional-id-1',
	topic: 'topic-1',
	async * project({ message }) {
		if (message.value?.toString() === 'foo') {
			yield {
				topicMessages: [
					{
						topic: 'topic-2',
						messages: [
							{
								value: 'foo1',
							},
							{
								value: 'foo2',
							},
						],
					},
				],
			};
		}
	},
});

await Rx.firstValueFrom(observable);

/rxjs-kafkajs/

    Package Sidebar

    Install

    npm i rxjs-kafkajs

    Weekly Downloads

    10

    Version

    1.0.0

    License

    GPL-3.0-or-later OR MIT

    Unpacked Size

    263 kB

    Total Files

    20

    Last publish

    Collaborators

    • futpib