Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As of now, file and in memory MaxSCNReaderWriter are supported. If a machine goes down, in memory and local file system SCN is lost. Added mysql MaxSCNReaderWriter for fault tolerance and reliable persistence of SCN.
Others using databus might find this as useful. Please let me know your thoughts on this.
Added flexibility to declare schema of scn table and queries.
Note : Please don't add this scn table in source database and set flushItvl=1, it will cause an infinite loop.
Example configs :
databus.relay.dataSources.sequenceNumbersHandler.type=MYSQL
databus.relay.dataSources.sequenceNumbersHandler.mysql.jdbcUrl=jdbc:mysql://mysqlhost:port/dbName
databus.relay.dataSources.sequenceNumbersHandler.mysql.scnTable=databus_scn_store
databus.relay.dataSources.sequenceNumbersHandler.mysql.dbUser=root
databus.relay.dataSources.sequenceNumbersHandler.mysql.dbPassword=password
databus.relay.dataSources.sequenceNumbersHandler.mysql.driverClass=com.mysql.jdbc.Driver
databus.relay.dataSources.sequenceNumbersHandler.mysql.flushItvl=5
databus.relay.dataSources.sequenceNumbersHandler.mysql.upsertSCNQuery=insert into databus_scn_store (max_scn) values (?)
databus.relay.dataSources.sequenceNumbersHandler.mysql.getSCNQuery=select max_scn from databus_scn_store order by updated_at desc limit 1
databus.relay.dataSources.sequenceNumbersHandler.mysql.scnColumnName=max_scn