@Override public void configure(Context context) { setName(NAME_PREFIX + counter.getAndIncrement()); host = context.getString(HOST, DEFAULT_HOST); port = context.getInteger(PORT, DEFAULT_PORT); username = context.getString(USERNAME); password = context.getString(PASSWORD); model = CollectionModel.valueOf(context.getString(MODEL, CollectionModel.single.name())); dbName = context.getString(DB_NAME, DEFAULT_DB); collectionName = context.getString(COLLECTION, DEFAULT_COLLECTION); batchSize = context.getInteger(BATCH_SIZE, DEFAULT_BATCH); autoWrap = context.getBoolean(AUTO_WRAP, DEFAULT_AUTO_WRAP); wrapField = context.getString(WRAP_FIELD, DEFAULT_WRAP_FIELD); logger.info( "MongoSink {} context { host:{}, port:{}, username:{}, password:{}, model:{}, dbName:{}, collectionName:{}, batch: {} }", new Object[] { getName(), host, port, username, password, model, dbName, collectionName, batchSize }); }