简体   繁体   中英

Disable the embedded cassandra of lagom framework

I start my first Lagom example via this command:

activator new my-first-system lagom-java

When I tried to start this project I noticed that I have an embedded Casandra started.

So I tried to disable this one to connect to my external Cassandra instance. To do that I used:

lagomCassandraEnabled in ThisBuild := false
lagomUnmanagedServices in ThisBuild := Map("cas_native" -> "http://ip:9042")

With this configuration, I succeed to connect to my Cassandra instance, but even that I still have a kind of heaviness in my build.

So I want to know by disabling Lagom Cassandra:

  1. it will be started but it will be not used? or
  2. it will be not downloaded So it will be not started?

Any help, please

Cassandra will not be started when lagomCassandraEnabled in ThisBuild := false , regarding the download using Maven or Ivy will cache the libraries locally in your desktop, so probably the first build will more time but after the consecutive builds should be faster.

https://www.lagomframework.com/documentation/1.3.x/java/CassandraServer.html

You should not see the message:

[info] Starting Cassandra and [info] Cassandra server running at 127.0.0.1:4000 in the log...

To check detailed activity of Cassandra you can configure the logging

https://www.lagomframework.com/documentation/1.3.x/java/SettingsLogger.html

with: <logger name="org.apache.cassandra" level="ALL" /> <logger name="com.datastax.driver" level="ALL" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM