Skip to content
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

Json stream item is not processed immediately after receiving in ChunkedStreamingMultiSubscriber.class #30690

Closed
paloliska opened this issue Jan 29, 2023 · 4 comments · Fixed by #30737
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@paloliska
Copy link

paloliska commented Jan 29, 2023

Describe the bug

When using rest endpoint with application/stream+json content type, after receiving json object is not processed immediately.
Client is expecting stream element separator to process element. Separator is sent as prefix with subsequent elements. This means that stream element is processed after receiving next one.

Expected behavior

Stream element should be processed immediately after receiving.

Maybe ChunkedStreamingMultiSubscriber should add separator as postfix, not as prefix with next item.

Actual behavior

Strem element is processed after receiving next one (or stream closed).

How to Reproduce?

Reproducer: https://github.com/paloliska/json-stream

steps:

  1. Run test in reproducer project.

Output of uname -a or ver

Linux user 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "17.0.5" 2022-10-18

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.16.0.Final, 3.0.1.Final

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

Apache Maven 3.6.3

Additional information

No response

@paloliska paloliska added the kind/bug Something isn't working label Jan 29, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 30, 2023

/cc @FroMage (resteasy-reactive), @Sgitario (resteasy-reactive), @stuartwdouglas (resteasy-reactive)

@geoand
Copy link
Contributor

geoand commented Jan 30, 2023

@Sgitario mind taking a look at this?

@Sgitario
Copy link
Contributor

Fix: #30737

Sgitario added a commit to Sgitario/quarkus that referenced this issue Feb 6, 2023
@paloliska
Copy link
Author

issue updated with reproducer for quarkus 3.0.1.Final

Sgitario added a commit to Sgitario/quarkus that referenced this issue Apr 28, 2023
Sgitario added a commit to Sgitario/quarkus that referenced this issue May 16, 2023
@quarkus-bot quarkus-bot bot added this to the 3.1 - main milestone May 17, 2023
michelle-purcell pushed a commit to michelle-purcell/quarkus that referenced this issue May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants