Search code examples
javaspring-bootsymmetricds

SymmetricDS Spring boot with Embedded Clients


Is it possible to have only Client type nodes?

When my Spring boot app start as with SymmetricDS Client I see the following in the log:

SymmetricDS: type=client......

What if all the nodes will sync with each other and there won't be a server?

I have the following code:

public ClientNode(File file) throws IOException {
    propFile = file;
    Properties propertiesFile = new Properties();
    propertiesFile.load(new FileReader(propFile));
    cEngine = new ClientSymmetricEngine(propertiesFile, false);
    getcEngine().setup();
    getcEngine().openRegistration("client", "001");
    getcEngine().start();
}

How will they register each other? I have the following properties:

external.id=001
engine.name=client-001
sync.url=http://localhost:8080/sync/client-001
group.id=client
db.url=jdbc:h2:mem:testdb;LOCK_TIMEOUT=60000
db.driver=org.h2.Driver
db.user=USER
registration.url=http://localhost:31415/sync/server
db.password=PW
job.routing.period.time.ms=5000
job.push.period.time.ms=10000
job.pull.period.time.ms=10000
initial.load.create.first=true
auto.config.database=true

 #I was hoping this will make it register
auto.registration=true
auto_reload=true

Solution

  • You’ll need to promote of one the nodes to a server. It will be served to configure the system and to register all clients against