full-reactive-stack | Full Reactive Stack with Spring Boot | Reactive Programming library
kandi X-RAY | full-reactive-stack Summary
kandi X-RAY | full-reactive-stack Summary
This repository contains backend and frontend projects that make use of Reactive Web patterns, as explained in the mini book Full Reactive Stack with Spring Boot 2, WebFlux, MongoDB and Angular and also in the Full Reactive Stack series of posts.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Runs the application
- Gets the id sequence
- Gets all quoted quotes
- Gets quoted quotes
- Get the Flux for quoted quotes
- Gets a list of quoted quotes
- Add CORS configuration
- Returns true if quotes are equal
- Returns a hashCode of the book
- The main application
full-reactive-stack Key Features
full-reactive-stack Examples and Code Snippets
Community Discussions
Trending Discussions on full-reactive-stack
QUESTION
Currently looking at SSE using Angular 5 and Spring 5 webflux. The basic application is working correctly, but whilst investigating error handling we've noticed that the EventSource
in the angular application doesn't see any difference between spring closing the connection due to reaching the end of the Flux stream of data, and an error occuring (e.g. terminating the application mid transfer).
The examples we've based our investigations on are the following.
https://thepracticaldeveloper.com/2017/11/04/full-reactive-stack-ii-the-angularjs-client/
Both onerror and the completion function in the EventSource
get called either when the data is send by spring successfully and reaches the end of the stream, which then closes the connection, or when we ctrl+c the application mid stream, or when we throw an exception randomly in the middle of sending data.
The EventSource
argument just contains {type: 'error'}
in all 3 cases.
ANSWER
Answered 2018-Apr-24 at 13:50From what I understand, SSE streams are mainly about infinite streams; the spec doesn't seem to offer a standard way of signaling the end of a stream to clients (they will try to reconnect by default).
You could implement that in your controller, by returning a Flux
and terminating the flux with a custom event:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install full-reactive-stack
You can use full-reactive-stack like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the full-reactive-stack component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page