Collector
Distribution lightly queue stream collect service.
Pre-requisite
Nats cluster needs to enable JetStream
MongoDB recommends version >= 5.0 so that time series collections can be used
Services and applications should work together the same nats tenant
Deploy
A collector service that subscribes to stream queues and then writes to data.
If you use the time series collection, you need to manually create a database and then add a data stream. Set the time series collection time field to timestamp
and metadata field to metaField
. Nats Stream naming COLLECT_${key}
is consistent with database name ${key}
.
The main container image is:
ghcr.io/weplanx/collector:latest
registry.cn-shenzhen.aliyuncs.com/weplanx/collector:latest
The case will use Kubernetes deployment orchestration, replicate deployment (modify as needed).
Environement
MODE
Working mode, default
debug
NATS_HOSTS *required
Nats connection host, use
,
split
NATS_NKEY *required
Nats NKEY authentication
DATABASE_URL *required
MongoDB connection address
DATABASE_NAME *required
MongoDB database name
Client
The client for managing collector configuration, data transmission, and dispatching, installed in the application:
Initialize
Set
Update
Get Info
Publish
Remove
License
Last updated