Search code examples
amqpquarkusmicroprofile

is it possible to delay consuming from channels (amqp,kafka etc) in quarkus?


My service needs to set up some data and connections (e.g thirdy party tokens, hazelcast connection) before starting to consume from Incoming channels. But I noticed that the amqp connections also happen at startup and as soon as they connect they start consuming before the aforementioned setup has finished. So is it possible to delay consumption from incoming queues?


Solution

  • I solved my particular situation with the following.

    void onStart(@Observes StartupEvent ev) {
        setupTokens();
    }
    

    The documentation is here