Files
cgrates/data/conf/samples/ers_nats/cgrates.json
ionutboangiu edfe2b5ef7 Revise nats reader integration tests
They were failing after the ERs structure changes.

Added a commented helper program at the end of the test to
help generate credentials for testing nats JWT functionality
2024-09-20 11:24:37 +02:00

81 lines
2.2 KiB
JSON

{
"data_db": {
"db_type": "*internal"
},
"stor_db": {
"db_type": "*internal"
},
"ees": {
"enabled": true,
"exporters": [
{
"id": "nats_processed",
"type": "*natsJSONMap",
"export_path": "nats://localhost:4222",
"attempts": 1,
"opts": {
"natsJetStream": true,
"natsSubject": "cgrates_cdrs_processed"
}
}
]
},
"ers": {
"enabled": true,
"sessions_conns":[],
"ees_conns": ["*localhost"],
"readers": [
{
"id": "nats_reader1",
"type": "*natsJSONMap",
"source_path": "nats://127.0.0.1:4222",
"processed_path": "nats://127.0.0.1:4222",
"ees_success_ids": ["nats_processed"],
"opts": {
"natsJetStream": true,
"natsConsumerName": "cgrates",
"natsStreamName": "stream",
"natsSubject": "cgrates_cdrs",
"natsQueueID": "queue",
"natsJetStreamMaxWait": "5s"
},
"flags": ["*dryRun"],
"fields":[
{"tag": "cdr_template", "type": "*template", "value": "cdr_template"}
]
},
{
"id": "nats_reader2",
"type": "*natsJSONMap",
"source_path": "nats://127.0.0.1:4222",
"processed_path": "nats://127.0.0.1:4222",
"ees_success_ids": ["nats_processed"],
"opts": {
"natsJetStream": true,
"natsConsumerName": "cgrates",
"natsStreamName": "stream",
"natsSubject": "cgrates_cdrs",
"natsQueueID": "queue",
"natsJetStreamMaxWait": "5s"
},
"flags": ["*dryRun"],
"fields":[
{"tag": "cdr_template", "type": "*template", "value": "cdr_template"}
]
}
]
},
"templates": {
"cdr_template": [
{"tag": "Account", "path": "*cgreq.Account", "type": "*variable", "value": "~*req.Account", "mandatory": true},
{"tag": "Subject", "path": "*cgreq.Subject", "type": "*variable", "value": "~*req.Subject", "mandatory": true},
{"tag": "Destination", "path": "*cgreq.Destination", "type": "*variable", "value": "~*req.Destination", "mandatory": true}
]
}
}