commit | b307466f3fc4fa25ba21de87c568a4095cf18f4f | [log] [tgz] |
---|---|---|
author | Heng Du <duhengforever@apache.org> | Mon Mar 30 11:43:35 2020 +0800 |
committer | GitHub <noreply@github.com> | Mon Mar 30 11:43:35 2020 +0800 |
tree | 773ff348e1f3c7bcf551468b50b1980ef3a848bc | |
parent | db51f7ff808a10209ff7eafb68cec0e08f25f058 [diff] |
bump up the connect version to 0.1.1 bump up the connect version to 0.1.1
this is source connector moudle for mongo,you can run this by running rocketmq connecotr api,
some junit rely on mongo database you can flow step run a mongo container
docker run -p27027:27017 --name mongo-test -d mongo:4.0.10 --replSet "repl1"
docker exec -it mongo-test mongo
rs.initiate()
init a mongo replicaSet run all junit test
method MongoFactoryTest#testSSLTrustStore
is for mongo ssl or tsl test,need mongod config ssl mode, if you want use ssl or tsl you need modify junit , appoint ssl or tsl pem path and password。
param | Description | type |
---|---|---|
mongoAddr | shardName=replicaSetName/127.0.0.1:2781,127.0.0.1:2782,127.0.0.1:2783; | string, split by ; |
mongoUserName | mongo root username | string |
mongoPassWord | mongo root password | string |
interestDbAndCollection | {“dbName”:[“collection1”,“collection2”]}, collectionName can be “*” means all collection | json |
positionTimeStamp | mongo oplog bsontimestamp.value , runtime store position is highest level | int |
positionInc | mongo oplog bsontimestamp.inc , runtime store position is highest level | int |
dataSync | sync all interestDbAndCollection data, runtime store position is highest level | json, Map<String(dbName), List<String(collectionName)>> |
serverSelectionTimeoutMS | mongo driver select replicaServer timeout | long |
connectTimeoutMS | mongo driver connect socket timeout | long |
socketTimeoutMS | mongo driver read or write timeout | long |
ssl or tsl | mongo driver use ssl or tsl | boolean |
tlsInsecure or sslInvalidHostNameAllowed | mongo driver when use ssl or tsl allow invalid hostname | boolean |
compressors | compressors way | string (zlib or snappy) |
zlibCompressionLevel | zlib compressors level | int (1-7) |
trustStore | ssl pem | path |
trustStorePassword | ssl pem decrypt password | string |
http://127.0.0.1:8081/connectors/testMongoReplicaSet?config={"connector-class":"org.apache.connect.mongo.connector.MongoSourceConnector","oms-driver-url":"oms:rocketmq://localhost:9876/default:default","mongoAddr":"rep1/127.0.0.1:27077,127.0.0.1:27078,127.0.0.1:27080","source-record-converter":"org.apache.rocketmq.connect.runtime.converter.JsonConverter"}