forked from peter-mount/notify-rabbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
109 lines (103 loc) · 4.15 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Example configuration in YAML
#
databases:
# Local test database
test:
# if the dsn starts with $ then it will be fetch from env.
#dsn: $PGSQL_DSN
#enabled: true
# or
dsn: pgsql://notify:[email protected]:5432/notify
enabled: true
## or
#enabled: true
#host: localhost
#port: 5432
#database: notify
#user: notify
#password: notify
#ssl: false
# Notify listeners
# These are used by the notify-rabbit.js application which connects
# to each database and adds a notify listener so that postgresql code
# can issue NOTIFY('key','message') and that message is sent to
# a rabbitmq instance
notify:
-
# Is this notifier enabled, disabled if absent/ !true
enabled: true
# Database to connect to (required)
database: test
# The notification name to listen to (required)
name: notify
# Log the message and metadata to the console (optional)
debug: true
# Convert the payload into json (optional) defaults to false
json: true
# Handlers to use. This is a map of handlers and any config they
# require. The config format is specific to each handler. Also
# An app doesn't have to support a handler, just define them
# when calling the notify() method
handlers:
# Example handler, logs the payload to the console (optional)
#console: true
# Rabbit instance to use
rabbit:
instance: testRabbit
# Topic to use, defaults to amq.topic (required if rabbit set)
#topic: amq.topic
# key: use just a routing key and send entire message to that key
key: job.status
# Valid only if json:true if set then the key in the message
# containing the routing key
routingKey: key
# Valid only when routingKey is valid, the key of the message
# containing the actual message. If missing then the original
# message is sent instead
payload: body
# Type header
typeHeader: xtype
# - # Is this notifier enabled, disabled if absent/ !true
# enabled: true
# # Database to connect to (required)
# database: test
# The notification name to listen to (required)
# name: notify
# Log the message and meta data to the console (optional)
# debug: true
# Convert the payload into json (optional) defaults to false
# json: true
# Handlers to use. This is a map of handlers and any config they
# require. The config format is specific to each handler. Also
# An app doesn't have to support a handler, just define them
# when calling the notify() method
# handlers:
# rabbit:
# instance: anotherRabbit
# Topic to use, defaults to amq.topic (required if rabbit set)
#topic: amq.topic
# key: use just a routing key and send entire message to that key
# key: job.status
# Valid only if json:true if set then the key in the message
# containing the routing key
# routingKey: key
# Valid only when routingKey is valid, the key of the message
# containing the actual message. If missing then the original
# message is sent instead
# payload: body
# Type header
# typeHeader: xtype
# redis:
# instance: testRedis
# streamKey: stream_key
# payload: body
#id: stream_id
# RabbitMQ configuration
rabbit:
# Test rabbit instance with user guest, password guest on localhost.
# You can put an IP address here, for IPv6 enclose the address with []
testRabbit: amqp://guest:[email protected]
#testRabbit: $RABBITMQ_DSN
#anotherRabbit: amqp://truckspyapp:[email protected]
#redis:
# testRedis: 69.164.194.20