samedi 9 octobre 2021

What should I take in consideration in my Message Producer when sending messages to an "at least once" or an "exactly once" consumer?

I am using a Spring Webclient. I am not sure if I need to use a Synchronous approch, like blocking the thread until the end of execution. Are there other things my producer should take in consideration for either at least once or exactly once consumer pattern.

public User getUserByIdSync(final String id) {
    return webClient
            .get()
            .uri(String.join("", "/users/", id))
            .retrieve()
            .bodyToMono(User.class)
            .block();

Aucun commentaire:

Enregistrer un commentaire