2017 © Pedro Peláez
 

library event-store-mongodb

A MongoDB EventStore implementation for Broadway.

image

broadway/event-store-mongodb

A MongoDB EventStore implementation for Broadway.

  • Saturday, December 9, 2017
  • by othillo
  • Repository
  • 4 Watchers
  • 4 Stars
  • 958 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

broadway/event-store-mongodb

build status, (*1)

Installation:

Install package via composer, (*2)

$ composer require broadway/event-store-mongodb

Configuration

Register the services, (*3)

parameters:
    mongodb_host: localhost
    mongodb_port: 27107
    mongodb_database: default 

services:
    broadway.event_store.mongodb_client:
        class: MongoDB\Client
        arguments: ['mongodb://%mongodb_host%:%mongodb_port%']

    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
        arguments: ['@broadway.event_store.mongodb_collection', '@broadway.serializer.payload', '@broadway.serializer.metadata']

Create index for events collection, (*4)

db.getCollection('events').createIndex({'uuid': 1, 'playhead': 1},{'unique': 1});

Testing

For testing you need a running MongoDB instance. To start a local MongoDB you can use the provided docker-compose.yml:, (*5)

docker-compose up -d

To run the tests:, (*6)

./vendor/bin/phpunit

The Versions

09/12 2017

dev-master

9999999-dev https://github.com/broadway/event-store-mongodb

A MongoDB EventStore implementation for Broadway.

  Sources   Download

MIT

The Requires

 

The Development Requires

09/12 2017

0.2.0

0.2.0.0 https://github.com/broadway/event-store-mongodb

A MongoDB EventStore implementation for Broadway.

  Sources   Download

MIT

The Requires

 

The Development Requires

23/08 2017

0.1.0

0.1.0.0 https://github.com/broadway/event-store-mongodb

A MongoDB EventStore implementation for Broadway.

  Sources   Download

MIT

The Requires

 

The Development Requires