protected final MessageValues serializePayloadIfNecessary(Message<?> message) {
		Object originalPayload = message.getPayload();
		Object originalContentType = message.getHeaders().get(MessageHeaders.CONTENT_TYPE);

		//Pass content type as String since some transport adapters will exclude CONTENT_TYPE Header otherwise
		Object contentType = JavaClassMimeTypeConversion.mimeTypeFromObject(originalPayload).toString();
		Object payload = serializePayloadIfNecessary(originalPayload);
		MessageValues messageValues = new MessageValues(message);
		messageValues.setPayload(payload);
		messageValues.put(MessageHeaders.CONTENT_TYPE, contentType);
		if (originalContentType != null) {
			messageValues.put(XdHeaders.XD_ORIGINAL_CONTENT_TYPE, originalContentType);
		}
		return messageValues;
	}
Create a producer for the named channel and bind it to the bus. Synchronized to avoid creating multiple
instances.
@param name The name.
@param channelName The name of the channel to be created, and registered as bean.
@param properties The properties.
@return The channel.
spring-xd-messagebus-spi/src/main/java/org/springframework/xd/dirt/integration/bus/MessageBusSupport.java