Skip to content

Getting io.vertx.core.VertxException: Thread blocked #1700

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

You must be logged in to vote

I found a solution following your advice ("if you do not request, the kafka connector will automatically pause the consumption and so, you may not have to do anything"). Basically my solution is:

// create a subscriber and assign it to a variable
@PostConstruct
void init() {
    copyReadySubscriber = new BaseSubscriber<>() {
        @Override
        public void hookOnNext(IncomingKafkaRecord<String, PlayerCopyReady> message) {
            // subscriber inserts payloads in cache (cache from this class or any other class)
            keyFinderCache.insert(message.getPayload());
        }
    };
}

// just return this subscriber here
@Incoming("copy-ready-topic")
@Acknowledgment(Acknowledgment

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@PyAntony
Comment options

@cescoffier
Comment options

Comment options

You must be logged in to vote
6 replies
@PyAntony
Comment options

@cescoffier
Comment options

@PyAntony
Comment options

@cescoffier
Comment options

@PyAntony
Comment options

Answer selected by PyAntony
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