mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-12 07:36:34 +03:00
recipe for broadway/event-store-mongodb
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
broadway:
|
||||
event_store: broadway.event_store.mongodb
|
||||
|
||||
services:
|
||||
broadway.event_store.mongodb_client:
|
||||
class: MongoDB\Client
|
||||
arguments: ['%mongodb_uri%']
|
||||
|
||||
broadway.event_store.mongodb_collection:
|
||||
class: MongoDB\Collection
|
||||
factory: ['@broadway.event_store.mongodb_client', selectCollection]
|
||||
arguments: ['%mongodb_database%', 'events']
|
||||
|
||||
broadway.event_store.mongodb:
|
||||
class: Broadway\EventStore\MongoDB\MongoDBEventStore
|
||||
public: true
|
||||
arguments: ['@broadway.event_store.mongodb_collection', '@broadway.serializer.payload', '@broadway.serializer.metadata']
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/"
|
||||
},
|
||||
"container": {
|
||||
"mongodb_uri": "mongodb://127.0.0.1/",
|
||||
"mongodb_database": "default"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user