Skip to content

Issue with chaining web requests. #1217

Answered by JarlDue
JarlDue asked this question in Q&A
Discussion options

You must be logged in to vote

While building the reproducer, I stumbled upon why it was not working.

A CorrelationIdFilter had recently been added and this was causing the issue.

import org.slf4j.MDC;

import javax.enterprise.context.RequestScoped;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.ext.Provider;

import static configuration.correlation.CorrelationIdFilter.CORRELATION_ID_HEADER;

@Provider
@RequestScoped
public class CorrelationIdClientFilter implements ClientRequestFilter {
    @Override
    public void filter(ClientRequestContext requestContext) {
        String correlationIdHeader = MDC.get(CORRELATION_ID_HEADER);
        requestContext.…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jponge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants