-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to configure fetchAndLock long poll? (asyncResponseTimeout has no effect) #353
Comments
The project seems to depend on when asyncResponseTimeout is feature of
|
Hi @datakurre , thanks for reporting this issue and giving us those hints. There is a small typo in the dependency you mentioned. Correct is I tried replacing the dependency but then it fails with {"type":"NullPointerException","message":"Cannot invoke \"org.camunda.bpm.engine.rest.spi.FetchAndLockHandler.addPendingRequest(org.camunda.bpm.engine.rest.dto.externaltask.FetchExternalTasksExtendedDto, javax.ws.rs.container.AsyncResponse, org.camunda.bpm.engine.ProcessEngine)\" because \"fetchAndLockHandler\" is null"} Your're welcome to create a PR (see CONTRIBUTING.md) - otherwise @arolfes and I will have a closer look. Note: this is the issue of the Spring Boot Starter Project which switched the mentioned dependencies: https://jira.camunda.com/browse/CAM-8799 |
@tobiasschaefer Thanks for confirming the issue! Unfortunately, I was unable to solve
Some pointers, though... The exception is raised from The missing handler should have been set at Which was one called at but I am not sure, how should it work now. |
…itializing the REST api so that long polling works, i.e. the if there are currently no tasks then the server will keep the connection open for the given time.
🎉❤️ |
Hi @datakurre , we've published release v2.3.1 which fixes the bug you reported. Please confirm that your issue has been resolved (and thanks for reporting it). |
@tobiasschaefer Unfortunately, I was unable to confirm the fix yet 😳 I am new to micronaut, but I assume that updating pom.xml should be enough
And after shutting down, I now get the following stacktrace:
|
Yes, your change in the dependency is correct 👍 The exception is surely an unwanted side effect of the deletion of the So this would need to added again - and also for the other listener. However, I cannot reproduce the error but need to to safely fix it. How are you building, starting and stopping your application? I've tried various ways but never get an exception when stopping it. Which JDK are you using? The interface "ServletContextListener" has a default implementation for both methods so it's unclear to me why these must be implemented. |
@tobiasschaefer I created the app using https://micronaut.io/launch/ with Java 17 and Maven, starting with ./mvnw mn:run with OpenJDK Runtime Environment (build 17.0.1+12), stopping here with Ctrl+C. Curiously, I also get this error from the default test provided by micronaut launch scaffold with I was able reproduce this by creating a new scaffold with just camunda and h2 features and configuring jetty + webapps + rest. Update: Got the same results with OpenJDK Runtime Environment (build 11.0.12). |
…Listener does not define or inherit an implementation of the resolved method 'abstract void contextDestroyed(javax.servlet.ServletContextEvent)' of interface javax.servlet.ServletContextListener"
…ine or inherit an implementation of the resolved method 'abstract void contextDestroyed(javax.servlet.ServletContextEvent)' of interface javax.servlet.ServletContextListener"
@datakurre Release 2.3.2 should now work for you. Looking forward to your feedback! |
@tobiasschaefer I can confirm that everything works now. Thanks a lot for the hard work and quick fixes! FYI. asyncResponseTimeout still does not work when run with |
@datakurre Note:
|
@tobiasschaefer Thanks. I'm quite happy now with long-polling working in built version. Regarding maven vs. gradle, are there any runtime related differences? (Not sure if I miss anything that I'd really need.) |
@datakurre no, I’m not aware of any differences. I’d be happy to discuss any other questions you might have and I’d also like to know more about your use use. I sent you a LinkedIn contact request 😀 |
…ting to Micronaut 3.x), see also camunda-community-hub/micronaut-camunda-platform-7#353
…ting to Micronaut 3.x), see also camunda-community-hub/micronaut-camunda-platform-7#353
I have followed README to configure a Micronaut Camunda application with jetty because of webapps support.
Unfortunately, asyncResponseTimeout for REST API external-task/fetchAndLock seem to have no effect. Response is always instantly returned:
The same command works as expected with the default Camunda Docker images.
The text was updated successfully, but these errors were encountered: