import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.StringSerializer;
import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.async.DeferredResult;
import javax.annotation.PreDestroy;
import java.util.Properties;
import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
@Slf4j
@PostMapping(path = "{key}")
public DeferredResult<ProduceResult> send(
@PathVariable String key,
+ @RequestHeader(name = "X-id", required = false) Long correlationId,
@RequestBody String value)
{
DeferredResult<ProduceResult> result = new DeferredResult<>();