
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
@djpfs/kafka-adonisjs
Advanced tools
npm i @djpfs/kafka-adonisjs
node ace configure @djpfs/kafka-adonisjs
Edit the .env
file to match your Kafka configuration.
Edit the config/kafka.js
file to edit the default configuration.
// file: start/kafka.js
import Kafka from '@ioc:Message/Kafka'
Kafka.admin.listTopics().then((topics: any[]) => {
console.log('topics', topics);
});
// file: start/kafka.js
import Kafka from '@ioc:Message/Kafka'
Kafka.admin.createTopics({
topics: [
{
topic: 'messages',
numPartitions: 1,
replicationFactor: 1,
},
],
waitForLeaders: true,
}).then((result: any) => {
console.log('result', result);
});
import Kafka from '@ioc:Message/Kafka'
Kafka.on('messages', (data: any, commit: any) => {
console.log(data)
// commit(false) // For error transaction
commit() // For successful transaction
});
import Kafka from "@ioc:Message/Kafka";
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
export default class UserController {
public async show({ params }: HttpContextContract) {
return Kafka.send('messages', { user_id: params.id })
}
}
import Kafka from '@ioc:Message/Kafka'
Kafka.admin.describeCluster().then((result: any) => {
console.log('result', result);
});
You can find a demo project here.
FAQs
Kafka Provider for AdonisJs
We found that @djpfs/kafka-adonisjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.