![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
bf-lib-kafkacouch
Advanced tools
This Library should handle all interactions between kafka and couch
It Monitor's created and updated,
#Usage
import { taskSchema } from "bf-legal-task";
import { KafkaCouchWatcher } from "lib-kafkacouch";
const TaskWatcher = new KafkaCouchWatcher({
subject: "task",
couch: `workflow-task_management`,
kafka: { topic: `WORKFLOW.TASK_MANAGEMENT`, groupId: "app-asdf" },
bodyValidation: taskSchema,
id: "id",
filter: (body, type, header) => {
return true;
},
map: (body, type, header) => {
return body;
}
});
//After a commit happens
TaskWatcher.on("updated", async (body, type, header) => {
console.log(packet);
});
import { taskSchema } from "bf-legal-task";
import { KafkaCouchWatcher } from "lib-kafkacouch";
const TaskWatcher = new KafkaCouchWatcher({
subject: "task",
couch: false,
kafka: { topic: `WORKFLOW.TASK_MANAGEMENT`, groupId: "app-asdf" },
bodyValidation: taskSchema,
filter: (body, type, header) => {
return true;
},
map: (body, type, header) => {
return body;
}
});
//After a commit happens
TaskWatcher.on("updated", async (body, type, header) => {
console.log(packet);
});
Couch by default get's it's creds from enviromental variables
const COUCH_USER: string = process.env.COUCH_USER || "admin";
const COUCH_PASSWORD: string = process.env.COUCH_PASSWORD || "password";
const COUCH_PORT: string = process.env.COUCH_PORT || "5984";
const COUCH_HOST: string = process.env.COUCH_HOST || "couchdb";
const COUCH_PROTO: string = process.env.COUCH_PROTO || "http";
Key | Description | Required |
---|---|---|
topic | Kafka Topic | true |
groupId | Group ID ( for Round Robin Groups ) | true |
host | Kafka Host | false |
sessionTimeout | false | |
protocol | false | |
fromOffset | false | |
protocol | false | |
commitOffsetsOnFirstJoin | false | |
outOfRangeOffset | false | |
onRebalance | false |
const k = {
topic: `WORKFLOW.TASK_MANAGEMENT`,
host: process.env.ZOOKEEPER_HOST || "zookeeper:2181",
groupId: process.env.KAFKA_GROUP_ID || "default-groupa",
sessionTimeout: 15000,
protocol: ["roundrobin"],
fromOffset: "earliest",
commitOffsetsOnFirstJoin: true,
outOfRangeOffset: "earliest",
onRebalance: (isAlreadyMember: any, callback: any) => {
callback();
} // or null
};
FAQs
Block-5 Kafka Couch Library
The npm package bf-lib-kafkacouch receives a total of 4 weekly downloads. As such, bf-lib-kafkacouch popularity was classified as not popular.
We found that bf-lib-kafkacouch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.