k8s-infra-cluster/infra/benthos/streams/poll_request_log_id_serial.yaml
2026-03-25 11:46:39 +01:00

28 lines
916 B
YAML

logger:
level: DEBUG # Force Benthos to tell us everything it's doing
format: logfmt
# This tells Benthos: Use the 'sql_poller' template as the input
input:
sql_poller:
dsn: "postgres://invixel_admin:${ECOM_PASS}@postgres-ha-rw.db.svc.cluster.local:5432/ecommerce?sslmode=disable"
#stream: "fact_stream"
#subject: "output_request_logs"
#dsn: "postgres://yugabyte@yugabytedb-2:5433/ecommerce?sslmode=disable"
table_name: "public.request_logs"
id_column: "id" # Or 'id' if you use the hashed string
pipeline:
processors:
- log:
level: INFO
message: "Polled a message: ${! content() }"
# The output sends the polled data back to NATS
output:
nats_jetstream:
#urls: [ "nats:4222" ]
urls: [ "nats://nats-cluster.infra.svc.cluster.local:4222" ]
subject: "output_request_logs"
stream: "fact_stream"
#manage_stream: true # This is the key setting