@@ -44,19 +44,20 @@ example with mongodb:
44
44
45
45
var es = require('eventstore')({
46
46
type: 'mongodb',
47
- host: 'localhost', // optional
48
- port: 27017, // optional
49
- dbName: 'eventstore', // optional
50
- eventsCollectionName: 'events', // optional
51
- snapshotsCollectionName: 'snapshots', // optional
52
- transactionsCollectionName: 'transactions', // optional
53
- timeout: 10000 // optional
47
+ host: 'localhost', // optional
48
+ port: 27017, // optional
49
+ dbName: 'eventstore', // optional
50
+ eventsCollectionName: 'events', // optional
51
+ snapshotsCollectionName: 'snapshots', // optional
52
+ transactionsCollectionName: 'transactions', // optional
53
+ timeout: 10000, // optional
54
+ emitStoreEvents: true // optional, by default no store events are emitted
54
55
// maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
55
- // authSource: 'authedicationDatabase', // optional
56
- // username: 'technicalDbUser', // optional
56
+ // authSource: 'authedicationDatabase' // optional
57
+ // username: 'technicalDbUser' // optional
57
58
// password: 'secret' // optional
58
59
// url: 'mongodb://user:pass@host:port/db?opts // optional
59
- // positionsCollectionName: 'positions' // optioanl , defaultly wont keep position
60
+ // positionsCollectionName: 'positions' // optional , defaultly wont keep position
60
61
});
61
62
62
63
example with redis:
@@ -69,9 +70,10 @@ example with redis:
69
70
prefix: 'eventstore', // optional
70
71
eventsCollectionName: 'events', // optional
71
72
snapshotsCollectionName: 'snapshots', // optional
73
+ emitStoreEvents: true, // optional, by default no store events are emitted
72
74
timeout: 10000 // optional
73
- // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
74
- // password: 'secret' // optional
75
+ // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
76
+ // password: 'secret' // optional
75
77
});
76
78
77
79
example with tingodb:
@@ -82,8 +84,9 @@ example with tingodb:
82
84
eventsCollectionName: 'events', // optional
83
85
snapshotsCollectionName: 'snapshots', // optional
84
86
transactionsCollectionName: 'transactions', // optional
85
- timeout: 10000 // optional
86
- // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
87
+ timeout: 10000, // optional
88
+ emitStoreEvents: true // optional, by default no store events are emitted
89
+ // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
87
90
});
88
91
89
92
example with elasticsearch:
@@ -95,8 +98,9 @@ example with elasticsearch:
95
98
eventsTypeName: 'events', // optional
96
99
snapshotsTypeName: 'snapshots', // optional
97
100
log: 'warning', // optional
98
- maxSearchResults: 10000 // optional
99
- // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
101
+ maxSearchResults: 10000, // optional
102
+ emitStoreEvents: true // optional, by default no store events are emitted
103
+ // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
100
104
});
101
105
102
106
example with custom elasticsearch client (e.g. with AWS ElasticSearch client. Note ``` http-aws-es ``` package usage in this example):
@@ -130,9 +134,10 @@ example with azuretable:
130
134
storageAccount: 'nodeeventstore',
131
135
storageAccessKey: 'aXJaod96t980AbNwG9Vh6T3ewPQnvMWAn289Wft9RTv+heXQBxLsY3Z4w66CI7NN12+1HUnHM8S3sUbcI5zctg==',
132
136
storageTableHost: 'https://nodeeventstore.table.core.windows.net/',
133
- eventsTableName: 'events', // optional
134
- snapshotsTableName: 'snapshots', // optional
135
- timeout: 10000 // optional
137
+ eventsTableName: 'events', // optional
138
+ snapshotsTableName: 'snapshots', // optional
139
+ timeout: 10000, // optional
140
+ emitStoreEvents: true // optional, by default no store events are emitted
136
141
});
137
142
138
143
example with dynamodb:
@@ -150,7 +155,8 @@ example with dynamodb:
150
155
UndispatchedEventsReadCapacityUnits: 1, // optional
151
156
useUndispatchedEventsTable: true // optional
152
157
eventsTableStreamEnabled: false // optional
153
- eventsTableStreamViewType: 'NEW_IMAGE' // optional
158
+ eventsTableStreamViewType: 'NEW_IMAGE', // optional
159
+ emitStoreEvents: true // optional, by default no store events are emitted
154
160
});
155
161
156
162
DynamoDB credentials are obtained by eventstore either from environment vars or credentials file. For setup see [ AWS Javascript SDK] ( http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html ) .
0 commit comments