Code review comment: It uses the original HTTP headers, not the ones that filters can add to.  At some point this needs to be cleaned up, but not today :)

Code under review:
public void write(ResteasyReactiveRequestContext context, Object entity) throws IOException {
        EncodedMediaType producesMediaType = context.getResponseContentType();
        MessageBodyWriter<?>[] writers = null;
        MediaType serverSerializersMediaType = null;
        if (producesMediaType == null) {
            MediaType selectedMediaType = null;
            boolean mediaTypeComesFromClient = false;
            ServerHttpRequest vertxRequest = context.serverRequest();
            
            if ((context.getTarget() != null) && (context.getTarget().getProduces() != null)) {
                ServerMediaType producesServerMediaType = context.getTarget().getProduces();
                MediaType negotiatedMediaType = null;
                List<String> accepts = context.getHttpHeaders().getRequestHeader(HttpHeaders.ACCEPT);
                for (String accept : accepts) {
                    negotiatedMediaType = producesServerMediaType.negotiateProduces(accept).getKey();
                    if (negotiatedMediaType != null) {
                        break;
                    }
                }
                if (negotiatedMediaType == null) { 
                    negotiatedMediaType = producesServerMediaType
                            .negotiateProduces(vertxRequest.getRequestHeader(HttpHeaders.ACCEPT)).getKey();
                }

                List<MessageBodyWriter<?>> writersList = serialisers.findWriters(null, entity.getClass(), negotiatedMediaType,
                        RuntimeType.SERVER);
                if (!writersList.isEmpty()) {
                    writers = writersList.toArray(EMPTY_ARRAY);
                    
                    
                    MediaType[] sortedOriginalMediaTypes = producesServerMediaType.getSortedOriginalMediaTypes();
                    for (MediaType methodMediaType : sortedOriginalMediaTypes) {
                        if (methodMediaType.isCompatible(negotiatedMediaType)) {
                            selectedMediaType = methodMediaType;
                            break;
                        }
                    }
                    if (selectedMediaType == null) {
                        
                        selectedMediaType = sortedOriginalMediaTypes[0];
                    }
                }
            } else if (vertxRequest.getRequestHeader(HttpHeaders.ACCEPT) != null
                    && !MediaType.WILDCARD.equals(vertxRequest.getRequestHeader(HttpHeaders.ACCEPT))) {
                

                ServerSerialisers.BestMatchingServerWriterResult bestMatchingServerWriterResult = serialisers
                        .findBestMatchingServerWriter(null, entity.getClass(), vertxRequest);
                if (!bestMatchingServerWriterResult.isEmpty()) {
                    selectedMediaType = bestMatchingServerWriterResult.getSelectedMediaType();
                    mediaTypeComesFromClient = true;
                    writers = bestMatchingServerWriterResult.getMessageBodyWriters().toArray(ServerSerialisers.NO_WRITER);
                }
            }
            
            if (writers == null) {
                ServerSerialisers.NoMediaTypeResult writerNoMediaType = serialisers.findWriterNoMediaType(context, entity,
                        serialisers, RuntimeType.SERVER);
                writers = writerNoMediaType.getWriters();
                selectedMediaType = writerNoMediaType.getMediaType();
            }
            if (selectedMediaType != null) {
                if (MediaTypeHelper.isUnsupportedWildcardSubtype(selectedMediaType) && !mediaTypeComesFromClient) { 
                    ServerSerialisers.encodeResponseHeaders(context);
                    
                    ServerHttpResponse httpServerResponse = context.serverResponse();
                    httpServerResponse.setStatusCode(Response.Status.NOT_ACCEPTABLE.getStatusCode());
                    
                    httpServerResponse.end();
                    return;
                } else {
                    serverSerializersMediaType = selectedMediaType;
                    context.setResponseContentType(selectedMediaType);
                    
                    context.serverResponse().addResponseHeader(HttpHeaders.CONTENT_TYPE,
                            context.getResponseContentType().toString());
                }
            }
        } else {
            writers = serialisers
                    .findWriters(null, entity.getClass(), producesMediaType.getMediaType(), RuntimeType.SERVER)
                    .toArray(ServerSerialisers.NO_WRITER);
        }
        for (MessageBodyWriter<?> w : writers) {
            if (ServerSerialisers.invokeWriter(context, entity, w, serialisers, serverSerializersMediaType)) {
                return;
            }
        }
        throw new InternalServerErrorException("Could not find MessageBodyWriter for " + entity.getClass(),
                Response.serverError().build());
    }

Line commented on: negotiatedMediaType = producesServerMediaType

Revised code:
public void write(ResteasyReactiveRequestContext context, Object entity) throws IOException {
        EncodedMediaType producesMediaType = context.getResponseContentType();
        MessageBodyWriter<?>[] writers = null;
        MediaType serverSerializersMediaType = null;
        if (producesMediaType == null) {
            MediaType selectedMediaType = null;
            boolean mediaTypeComesFromClient = false;
            ServerHttpRequest vertxRequest = context.serverRequest();
            
            if ((context.getTarget() != null) && (context.getTarget().getProduces() != null)) {
                ServerMediaType producesServerMediaType = context.getTarget().getProduces();
                MediaType negotiatedMediaType = null;
                List<String> accepts = context.getHttpHeaders().getRequestHeader(HttpHeaders.ACCEPT);
                for (String accept : accepts) {
                    negotiatedMediaType = producesServerMediaType.negotiateProduces(accept).getKey();
                    if (negotiatedMediaType != null) {
                        break;
                    }
                }
                if (negotiatedMediaType == null) { 
                    negotiatedMediaType = producesServerMediaType
                            .negotiateProduces(vertxRequest.getRequestHeader(HttpHeaders.ACCEPT)).getKey();
                }

                List<MessageBodyWriter<?>> writersList = serialisers.findWriters(null, entity.getClass(), negotiatedMediaType,
                        RuntimeType.SERVER);
                if (!writersList.isEmpty()) {
                    writers = writersList.toArray(EMPTY_ARRAY);
                    
                    
                    MediaType[] sortedOriginalMediaTypes = producesServerMediaType.getSortedOriginalMediaTypes();
                    for (MediaType methodMediaType : sortedOriginalMediaTypes) {
                        if (methodMediaType.isCompatible(negotiatedMediaType)) {
                            selectedMediaType = methodMediaType;
                            break;
                        }
                    }
                    if (selectedMediaType == null) {
                        
                        selectedMediaType = sortedOriginalMediaTypes[0];
                    }
                }
            } else if (vertxRequest.getRequestHeader(HttpHeaders.ACCEPT) != null
                    && !MediaType.WILDCARD.equals(vertxRequest.getRequestHeader(HttpHeaders.ACCEPT))) {
                

                ServerSerialisers.BestMatchingServerWriterResult bestMatchingServerWriterResult = serialisers
                        .findBestMatchingServerWriter(null, entity.getClass(), vertxRequest);
                if (!bestMatchingServerWriterResult.isEmpty()) {
                    selectedMediaType = bestMatchingServerWriterResult.getSelectedMediaType();
                    mediaTypeComesFromClient = true;
                    writers = bestMatchingServerWriterResult.getMessageBodyWriters().toArray(ServerSerialisers.NO_WRITER);
                }
            }
            
            if (writers == null) {
                ServerSerialisers.NoMediaTypeResult writerNoMediaType = serialisers.findWriterNoMediaType(context, entity,
                        serialisers, RuntimeType.SERVER);
                writers = writerNoMediaType.getWriters();
                selectedMediaType = writerNoMediaType.getMediaType();
            }
            if (selectedMediaType != null) {
                if (MediaTypeHelper.isUnsupportedWildcardSubtype(selectedMediaType) && !mediaTypeComesFromClient) { 
                    ServerSerialisers.encodeResponseHeaders(context);
                    
                    ServerHttpResponse httpServerResponse = context.serverResponse();
                    httpServerResponse.setStatusCode(Response.Status.NOT_ACCEPTABLE.getStatusCode());
                    
                    httpServerResponse.end();
                    return;
                } else {
                    serverSerializersMediaType = selectedMediaType;
                    context.setResponseContentType(selectedMediaType);
                    
                    context.serverResponse().addResponseHeader(HttpHeaders.CONTENT_TYPE,
                            context.getResponseContentType().toString());
                }
            }
        } else {
            writers = serialisers
                    .findWriters(null, entity.getClass(), producesMediaType.getMediaType(), RuntimeType.SERVER)
                    .toArray(ServerSerialisers.NO_WRITER);
        }
        for (MessageBodyWriter<?> w : writers) {
            if (ServerSerialisers.invokeWriter(context, entity, w, serialisers, serverSerializersMediaType)) {
                return;
            }
        }
        throw new InternalServerErrorException("Could not find MessageBodyWriter for " + entity.getClass(),
                Response.serverError().build());
    }