Scala Components

§Scala Components

This is a list of available Components you may use to build your application cake. This list contains Components provided by Lagom, Play and other libraries. You may develop your own Components and use those instead of the provided on this list as long as the contracts are fulfilled.

§Service Components
LagomServerComponents a main Component for any Lagom Service. See Defining your own components.
LagomServiceClientComponents a main Component for any Lagom Service or application consuming Lagom Services. See Dependency Injection in Lagom and Binding a service client.
§Persistence and Cluster Components
ClusterComponents registers the node to the Akka Cluster. The Akka Cluster is required by Pub-Sub and Persistent Entity support and you will rarely need to use it explicitly. See Cluster
PubSubComponents provides Publish-Subscribe. This requires ClusterComponents. See Publish-Subscribe
CassandraPersistenceComponents provides both Read-Side and Write-Side components for Cassandra-backed CQRS. It provides ReadSideCassandraPersistenceComponents and WriteSideCassandraPersistenceComponents which you might want to use in isolation. See PersistentEntityCassandra for more info.
JdbcPersistenceComponents provides both Read-Side and Write-Side components for Cassandra-backed CQRS. It provides ReadSideJdbcPersistenceComponentsand WriteSideJdbcPersistenceComponents which you might want to use in isolation. See PersistentEntityRDBMS.
ProjectionComponents provides projections to query the status and stop and start your projection workers. See Projections.
§Broker API Components
LagomKafkaClientComponents provide a Kafka implementation for the Broker API so that you Service can subscribe to a Kafka topic. SeeKafkaClient.
LagomKafkaComponents provides a Kafka implementation for the Broker API so that you Service can publish to a Kafka topic. This component includes LagomKafkaClientComponents so if you mix this one in, you will be able to publish and subscribe. See Kafka Client.
TestTopicComponents provides stubbing tools to test services that use the Broker API. This is meant to be used only on Applications you build on your tests. See Testing publish
§Service Locator Components
LagomDevModeServiceLocatorComponents provides the dev mode service locator. This is meant to be used by Lagom Services and other applications such as Play Apps that want to interact with Lagom Services in Dev Mode. See the scaladocs for more details.
LagomDevModeComponents provides the dev mode service locator and registers the services with it in dev mode. See Wiring together a Lagom application.
StaticServiceLocatorComponents provides a Service Locator that always resolves the same URI for a given Service name.
ConfigurationServiceLocatorComponents provides a Service Locator based on application.conf files. See Using static values for services and Cassandra to simulate a managed runtime.
RoundRobinServiceLocatorComponents provides a Service Locator that applies a Round Robin over the passed in sequence of URI.
CircuitBreakerComponents implementors of a Service Locator will need to extend this to reuse the Circuit Breaker config provided by Lagom.
AkkaDiscoveryComponents implementors of a Service Locator based on Akka Discovery. Available as opt-in dependency. It is the recommended implementation for production specially for users targeting Kubernetes and DC/OS (Marathon).
§Third party Components

You can mix in Components from other frameworks or libraries, for example:

Lagom inherits all Components provided by Play. You can find the complete list of inherited Components by searching for components in Play docs.

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.