question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SseEventSource does not get the close call from server after upgrading to Quarkus 2.1.0.Final or later

See original GitHub issue

Describe the bug

I have created an application that uses a SseEventSource to consume events from a service. The service in some cases close the connection to the client. Using Quarkus 2.0.3.Final or earlier builds the client gets the disconnected and auto connect. So far so good. Upgrading to Quarkus 2.1.0.Final or later the client does not get disconnected. The client just stops receiving events. SseEventSource::isOpen is still true

Expected behavior

Client should get the close call from server and auto connect

Actual behavior

Client still think the connection is open but no events are consumed.

How to Reproduce?

sse-example.zip

The example inlcudes two projects. One for the broker and on for the subscriber.

  1. Run in a command prompt or terminal gradlew build in path to project/sse-broker
  2. Run gradlew quarkusDev in path to project/sse-broker
  3. Run in another command prompt gradlew build in path to project/sse-test
  4. Run gradlew quarkusDev in path to project/sse-test
  5. Observe that the log Number of events: x, connected true still counts after the connection is closed (after a minute)
  6. Update Quarkus version in path to project/sse-test/gradle.properties to 2.1.0.Final and restart the applications
  7. Now observe that the log Number of events: x, connected true stops counting after the connections is closed

Output of uname -a or ver

No response

Output of java -version

11

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.1.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Gradle 7.1

Additional information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
gsmetcommented, Jan 1, 2022

https://issues.redhat.com/browse/RESTEASY-3051 has been fixed in RESTEasy 4.7.4.Final so this issue should be fixed starting with Quarkus 2.6.0.CR1.

1reaction
jimmacommented, Nov 24, 2021

@stuartwdouglas @johan-hanson Get it. I need to fix this with adding reconnect or close here: https://github.com/resteasy/resteasy/pull/2770/files#diff-3dd8163eff5a9534a4c0f7f98982ed905b4b5591766889e44749b4d524e19551R381. The Resteasy issue is created : https://issues.redhat.com/browse/RESTEASY-3051 I already fixed this locally and will merge to upstream soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Apache Kafka with Schema Registry and Avro - Quarkus
When not running in dev or test mode, you will need to start your own Kafka broker and Apicurio Registry. The easiest way...
Read more >
ScoopInstaller/Main/issues/new?title=lessmsi%401.10.0 ... - IssueHint
SseEventSource does not get the close call from server after upgrading to Quarkus 2.1.0.Final or later, 8, 2021-11-19, 2022-08-05.
Read more >
How to setup cloud recording service with Microsoft Azure
SseEventSource does not get the close call from server after upgrading to Quarkus 2.1.0.Final or later, 8, 2021-11-19 ; HTTPError: Response code ...
Read more >
RESTEasy is a JBoss project that provides various ...
RESTEasy is a JBoss.org project aimed at providing productivity frameworks for developing client and server RESTful applications and services in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found