You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The onDiscard hook added as part of #999 provides access to dropped data in case of an error or cancel signal but it looks like it doesn't cover cancellation everywhere, e.g. collectList.
A specific example of this could be making calls to remote HTTP services through the Spring Framework WebClient and zipping the results together. The codecs use DataBufferUtils#join which relies on collectList to aggregate data in some cases. So if one remote call errors or completes empty, others would be cancelled too potentially with in-flight data dropped. Other related examples could be based on timeout and retry.
The text was updated successfully, but these errors were encountered:
@rstoyanchev most operators supporting the onDiscard hook take the cancellation into account. collectList was not part of this set of supporting operators, but can be modified to "discard" the content of the accumulated List (precisely because the operator's implementation enforces the List type). (editing the issue's title accordingly)
On a related note, collectMap is based on the more generic collect, which doesn't enforce anything about the "container", so for both of these operators it would be trickier to implement onDiscard support 😢
The
onDiscard
hook added as part of #999 provides access to dropped data in case of an error or cancel signal but it looks like it doesn't cover cancellation everywhere, e.g.collectList
.A specific example of this could be making calls to remote HTTP services through the Spring Framework
WebClient
and zipping the results together. The codecs useDataBufferUtils#join
which relies oncollectList
to aggregate data in some cases. So if one remote call errors or completes empty, others would be cancelled too potentially with in-flight data dropped. Other related examples could be based on timeout and retry.The text was updated successfully, but these errors were encountered: