Skip to content

Instantly share code, notes, and snippets.

@winder
Created August 3, 2017 18:36
Show Gist options
  • Save winder/886e04c3ef1e2ed185b5bf50b97aa63e to your computer and use it in GitHub Desktop.
Save winder/886e04c3ef1e2ed185b5bf50b97aa63e to your computer and use it in GitHub Desktop.
FollowerConfig tc = FollowerConfig.builder()
.listener(new TestListener())
.initialExport(true)
.mongoConnectionString("mongodb://login:password@localhost:27017")
.mongoDatabase("cyberdyne")
.mongoCollection("skynet")
.oplogFile("/tmp/testapp/oplog_timestamp")
.build();
Runner.run(tc);
// Alternatively you can use a property file, which may make it easier
// to reconfigure for QA and PROD environments:
Properties props = new Properties();
InputStream steam = ...; // open file or resource
props.load(stream);
Runner.run(props, new TestListener());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment