@Override
	public Map<String, String> fromHeaders(MessageHeaders headers) {
		final Map<String, String> target = new HashMap<>();
		final Map<String, String> jsonHeaders = new HashMap<>();
		headers.forEach((key, value) -> {
			if (matches(key)) {
				if (value instanceof String strValue) {
					target.put(key, strValue);
				}
				else {
					try {
						String className = value.getClass().getName();
						target.put(key, objectMapper.writeValueAsString(value));
						jsonHeaders.put(key, className);
					}
					catch (Exception e) {
						log.debug("Could not map " + key + " with type "
								+ value.getClass().getName(), e);
					}
				}
			}
		});
		if (jsonHeaders.size() > 0) {
			try {
				target.put(JSON_TYPES, objectMapper.writeValueAsString(jsonHeaders));
			}
			catch (IllegalStateException | JsonProcessingException e) {
				log.error("Could not add json types header", e);
			}
		}
		return target;
	}
Header name for java types of other headers.
spring-cloud-alibaba-starters/spring-cloud-starter-stream-rocketmq/src/main/java/com/alibaba/cloud/stream/binder/rocketmq/support/JacksonRocketMQHeaderMapper.java