scullxbones / akka-persistence-mongo

Implementation of akka-persistence storage plugins for mongodb
Apache License 2.0
103 stars 55 forks source link

Establish a clear hierarchy of properties and corresponding files #177

Open asarkar opened 6 years ago

asarkar commented 6 years ago

Perhaps it's because I'm new to Akka Persistence, but I'm finding it very difficult to track the zillions of seemingly unrelated properties and where to put them. Some start with akka.contrib.persistence.mongodb, other akka-contrib-mongodb-persistence, and yet another akka.persistence. The documentation, unfortunately, doesn't make it any easier. For example, I wanted to disable snapshots, but the doc only shows how to do it for multiple configurations, which I assume has to be less common than disabling it globally for developmental purposes.

I propose that the doc clearly lays out the properties in a hierarchical manner instead of spreading them all over the place. For a seasoned Akka dev, this may not be much of an issue, but for beginners, this is beyond frustrating. The suggested format is as below:

application.conf

akka {
  contrib {
    persistence.mongodb {
      mongo {
        mongouri # this is the connection URI
        journal-collection # this is the collection name where the events are stored
      }
    }
  }
}

reference.conf

akka {
  persistence {
    journal {
      plugin = "akka-contrib-mongodb-persistence-journal"
    }
  }
}

I believe if the above format is followed, then most of the verbiage in the doc will not be necessary.

scullxbones commented 6 years ago

Hi @asarkar -

There was something like this (the default configuration) in the docs as of the 0.x version. I got rid of it for the 1.x version. I think it could be reintroduced - broken up by section with accompanying docs, no problem.