Coder Social home page Coder Social logo

Comments (13)

belkevglaz avatar belkevglaz commented on August 20, 2024 1

@bpasson made this timeout configurable, please.

from quarkus-rabbitmq-client.

bpasson avatar bpasson commented on August 20, 2024

Thanks for reporting the issue. Can you supply a small example that reproduces the issue?

from quarkus-rabbitmq-client.

belkevglaz avatar belkevglaz commented on August 20, 2024

Hi @bpasson
I prepared simple project that does nothing. No amqp consumers or rest entry points deliberately. Only initalization on startup.
I use Idea 2020.3.3 to run application in Quarkus Dev mode. Start and stop from idea run configuration. After stop - java app process hangs and should be killed to be able run again.

from quarkus-rabbitmq-client.

bpasson avatar bpasson commented on August 20, 2024

@belkevglaz you might have to help me a bit here. I'm not a heavy Gradle user, prefer Maven. When I want to have IntelliJ build your example project it fails with the following message.

Starting Gradle Daemon...
Gradle Daemon started in 1 s 103 ms

FAILURE: Build failed with an exception.

* Where:
Build file '/projects/quarkus-rmq-extension-hang-issue/build.gradle' line: 34

* What went wrong:
A problem occurred evaluating root project 'quarkus-rmq-extension-hang-issue'.
> java.lang.NullPointerException (no error message)

I probably have something not set up correctly. Any pointers?

from quarkus-rabbitmq-client.

belkevglaz avatar belkevglaz commented on August 20, 2024

@bpasson probably you are run on JDK 11 that does not have tools.jar. You can comment 1 and 34 rows (with mentions about tools.jar) or run on JDK8.

from quarkus-rabbitmq-client.

bpasson avatar bpasson commented on August 20, 2024

@belkevglaz I was running GraalVM Java 11. Switching to 8 fixed it.

from quarkus-rabbitmq-client.

bpasson avatar bpasson commented on August 20, 2024

@belkevglaz playing around with your project in Quarkus Dev mode it seems the RabbitMQ Java client never seems to get a reponse from the server on connection closing. I have no idea why this happens. I need to do some further investigation. A workaround is adding a timeout on the connection close method, but that could possibly have unwanted side effects.

from quarkus-rabbitmq-client.

bpasson avatar bpasson commented on August 20, 2024

@belkevglaz ok small update. Further digging lead me to the ManagedExecutor which is used when creating the client in stead of the client default. If using the managed executor it hangs, if not it terminates. Not sure why yet.

from quarkus-rabbitmq-client.

belkevglaz avatar belkevglaz commented on August 20, 2024

@bpasson one more finding. If run application in dev mode with debug (green bug icon) that looks like threads not hanged. I tried several times default run and in debug - and in all debug cases application can stop.
I guess that something wrong with thread management and even debug can affect it.

from quarkus-rabbitmq-client.

bpasson avatar bpasson commented on August 20, 2024

@belkevglaz I noticed that too, but presumably the connection was already closed as the heartbeat fails at 60s and the connection closes after which debug mode terminates perfectly. I haven't figured out what the difference is in running with a user defined executor service (quarkus managed executor) or a client managed executor service.

from quarkus-rabbitmq-client.

bpasson avatar bpasson commented on August 20, 2024

@belkevglaz right, I did extensive test runs and it seem to be related to the managed executor. I honestly have no idea what is. The intention to use it is for having context propagation with the consumer actions.

from quarkus-rabbitmq-client.

bpasson avatar bpasson commented on August 20, 2024

@belkevglaz I have a workaround for now, until a definite solution is found. I'll add a timeout when dev-mode is active to make sure the connection is closed always.

from quarkus-rabbitmq-client.

belkevglaz avatar belkevglaz commented on August 20, 2024

Thanks

from quarkus-rabbitmq-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.