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.
aedes-persistence-cassandra
Advanced tools
Aedes persistence, backed by Cassandra.
See aedes-persistence for the full API, and Aedes for usage.
NOTE: preliminary version, WIP.
npm install aedes aedes-persistence-cassandra --save
or
yarn add mqemitter-kafka aedes-persistence-cassandra
Target keyspace must be initialized with aedes.cql
script.
Creates a new instance of aedes-persistence-cassandra.
ttl
: Used to set a ttl (time to live) to documents stored in collections
packets
: Could be an integer value that specify the ttl in seconds of all packets collections or an Object that specifies for each collection its ttl in seconds. Packets collections are: incoming
, outgoing
, retained
, will
.susbscriptions
: Set a ttl (in seconds)cassandra
: Extra options to pass to Cassandra driver (see cassandra-driver) (alternative to client
)client
: Existing cassandra-driver
client instance (alternative to cassandra
)If neither cassandra
or client
option are supplied, connection to localhost:9042
will be attempted with local datacenter datacenter1
and keyspace aedes
.
Supplying an external client it's recommended.
const AedesPersistenceCassandra = require("aedes-persistence-cassandra");
AedesPersistenceCassandra({
cassandra: {
contactPoints: ["localhost:9042"],
localDataCenter: "datacenter1",
keyspace: "aedes"
},
// Optional ttl settings
ttl: {
packets: 300, // Number of seconds
subscriptions: 300,
}
})
With the previous configuration all packets will have a ttl of 300 seconds. You can also provide different ttl settings for each packet type:
ttl: {
packets: {
incoming: 100,
outgoing: 100,
will: 300,
retained: -1
}, // Number of seconds
subscriptions: 300,
}
If you want a specific packet type to be persistent just set corresponding ttl to null
or undefined
.
Implementation inspired after aedes-persistence-mongodb.
MIT
FAQs
Cassandra persistence for Aedes
The npm package aedes-persistence-cassandra receives a total of 1 weekly downloads. As such, aedes-persistence-cassandra popularity was classified as not popular.
We found that aedes-persistence-cassandra 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.
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.