@Override
	public <S extends StreamDefinition> S save(S entity) {
		try {
			Map<String, String> map = new HashMap<>();
			map.put(DEFINITION_KEY, entity.getDefinition());

			map.put(MODULE_DEFINITIONS_KEY, objectWriter.writeValueAsString(entity.getModuleDefinitions()));

			CuratorFramework client = zkConnection.getClient();
			String path = Paths.build(Paths.STREAMS, entity.getName());
			byte[] binary = ZooKeeperUtils.mapToBytes(map);

			BackgroundPathAndBytesable<?> op = client.checkExists().forPath(path) == null
					? client.create() : client.setData();

			op.forPath(path, binary);

			logger.trace("Saved stream {} with properties {}", path, map);

			StreamDefinitionRepositoryUtils.saveDependencies(moduleDependencyRepository, entity);
		}
		catch (Exception e) {
			// NodeExistsException indicates that we tried to create the
			// path just after another thread/jvm successfully created it 
			ZooKeeperUtils.wrapAndThrowIgnoring(e, NodeExistsException.class);
		}
		return entity;
	}
The key used in serialized properties to hold the parsed module definitions that make up a stream.
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/stream/zookeeper/ZooKeeperStreamDefinitionRepository.java