Package

eu.akkamo

mongo

Permalink

package mongo

Visibility
  1. Public
  2. All

Type Members

  1. trait ReactiveMongoApi extends AnyRef

    Permalink

    For each configured ReactiveMongo connection, the instance of this trait is registered into the Akkamo context and provides API for accessing the connection.

  2. class ReactiveMongoModule extends Module with Initializable with Disposable

    Permalink

    Akkamo module providing support for MongoDB via the ReactiveMongo driver.

    Akkamo module providing support for MongoDB via the ReactiveMongo driver.

    Example configuration

    akkamo.reactiveMongo {
    
     	// ReactiveMongo loads its configuration from here (e.g. configuration of the
     	// underlying Akka system)
     	akka {
       		loglevel = WARNING
     	}
      name1 = {
        aliases=["alias1", "alias2"]
        default = true // required if more than one reactive mongo configuration exists
        uri = "mongodb://someuser:somepasswd@localhost:27017/your_db_name"
      }
      name2 = {
        aliases=["alias1", "alias2"]
        uri = "mongodb://someuser:somepasswd@localhost:27017/your_db_name"
      }
    }

    Above is the working example of simple module configuration. In this configuration example, one ReactiveMongo connection is created and will be registered into the Akkamo context. Each configured connection is registered into the Akkamo context as the eu.akkamo.mongo.ReactiveMongoApi interface and is avaiable for injection via its name (e.g. name1), aliases (if defined, e.g. alias1 or alias2), or if defined as default without any name identifier.

    If configuration is missing, then default entry with uri: mongodb://localhost/default is created.

Ungrouped