Use a variable 'key'. And don't create a config if it doesn't contain anything special. nodeFactory.newHazelcastInstance() is also available.