{"repo":"tomasAlabes/graphql-kafkajs-subscriptions","free":true,"listed":false,"github":"https://github.com/tomasAlabes/graphql-kafkajs-subscriptions","clone":"git clone https://github.com/tomasAlabes/graphql-kafkajs-subscriptions.git","description":"Apollo graphql subscriptions using kafkajs","language":"TypeScript","stars":22,"topics":["kafkajs","graphql","graphql-subscriptions","graphql-kafkajs-subscriptions","apollo-graphql-subscriptions","kafka","nodejs"],"license":"MIT","category":"data-pipelines","readme_excerpt":"graphql-kafkajs-subscriptions Apollo graphql subscriptions over Kafka, using kafkajs. Inspired on graphql-kafka-subscriptions. Communication is done through 1 kafka topic specified in the KafkaPubSub create function. Then channels are used to identify the right subscription. Installation Usage Kafka Pub Sub Configurable Consumer Group ID You can now configure the Kafka consumer group ID in two ways: Option 1: Using groupIdPrefix (generates random group ID) - A random suffix is appended to the prefix on each instance - Creates a new consumer group on every deployment - Best for development or when you need completely independent consumers Option 2: Using consumerConfig.groupId (fixed group ID) - Use a fixed consumer group ID that persists across deployments - Prevents creation of hundreds of unused consumer groups - Recommended for production deployments Note: You must provide either groupIdPrefix or consumerConfig.groupId . If both are provided, consumerConfig.groupId takes precedence. Subscription Resolver You can also use the subscription payload for the channel. Publication Somewhere in your code, you call this: Use the rest of the kafkajs options: This ends up publishing the event to kafka (to the topic you used to create the kafkaPubSub ) and received by all consumers. The consumer which is listening to my channel will send it to the client. Listening to Consumer Lifecycle Events You can listen to Kafka consumer lifecycle events such as consumer.crash , consumer.stop , c","default_branch":null,"files":null,"tree":[],"storefront":"/r/tomasAlabes","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tomasAlabes/graphql-kafkajs-subscriptions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}