r/SpringBoot • • 21h ago

Question Are Springboot Udemy courses worth it?

1 Upvotes

Recently I have wanting to learn spingboot, the content I find on YouTube is quite fast paced and not structured so I'm looking for paid structured courses for learning.

Are they worth it?


r/SpringBoot • • 3h ago

How-To/Tutorial HyperLogLog | Visually Explained

Thumbnail
youtube.com
0 Upvotes

This is an exaustive explanation about how Hyperloglog works for platforms like reddit and google. I hope you enjoy it and please if you use the same kind of algorithm or similar on your work ( professionally ). share with me the way you do it and what kind of issues you run into. Tqhank you


r/SpringBoot • • 10h ago

Discussion ApplicationReadyEvent starts consuming before the server is actually ready

5 Upvotes

I ran into a subtle timing issue recently: a @EventListener(ApplicationReadyEvent.class) bean that starts consuming from a message queue. The event fires, the consumer begins pulling messages, but the embedded Tomcat/Jetty server hasn't finished binding its ports yet. If a producer sends a reply or a dependent service calls back immediately, the connection is refused or the message lands in a dead-letter queue because the app isn't actually serving traffic yet.

The docs say ApplicationReadyEvent means the application context is fully refreshed and ready to use, but in practice "ready" doesn't always equal "listening on the connector port." I worked around it by injecting a WebServer and checking isStarted() before starting the consumer, but that feels brittle across different embedded servers.

public class QueueConsumer {

    private final WebServer webServer;

    u/EventListener(ApplicationReadyEvent.class)
    public void start() {
        if (!webServer.isStarted()) {
            // wait or defer — but how long? polling feels wrong
        }
        // start consuming
    }
}

Questions:

  1. Is there a cleaner Spring-native hook that guarantees the web server is actually accepting connections before I start consuming?
  2. Have others seen this in production, or is it mostly a local-dev timing issue?
  3. Should the consumer lifecycle be tied to the WebServer instead of the application context?

I haven't tested this across Tomcat, Jetty, and Undertow yet, so I can't confirm whether the behavior differs by server. If someone has a reproducible example, I'd like to see it.