§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 ConductR. 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. |
MetricsServiceComponents | adds a MetricsService to your service so you can remotely track the status of the CircuitBreakers on your service. Using this only makes sense when you Application is consuming other services (hence using remote calls protected with Circuit Breakers). See Circuit Breaker Metrics |
§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 ReadSideJdbcPersistenceComponents and WriteSideJdbcPersistenceComponents which you might want to use in isolation. See PersistentEntityRDBMS. |
§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. |
§Third party Components
You can mix in Components
from other frameworks or libraries, for example:
- ConductRApplicationComponents: provides a Service Locator provided by ConductR, reads any ConductR provided configuration and makes the service register into ConductR’s Service Registry. See ConductR
- AhcWSComponents: provides a
WSClient
based on an Async HTTP Client. - DBComponents
- HikariCPComponents
Lagom inherits all Components provided by Play. You can find the complete list of inherited Components
by searching for components in Play docs.