[
https://issues.apache.org/jira/browse/HTTPCLIENT-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16588207#comment-16588207
]
Ryan Schmitt commented on HTTPCLIENT-1942:
------------------------------------------
One other thing I have a question about is the contract for {{FutureCallback}}
notifications and the {{releaseResources}} method. I've noticed that the
{{HttpAsyncRequester}} uses a {{BasicClientExchangeHandler}}, which delegates
{{consumeResponse}} calls to its {{AsyncResponseConsumer}}, but also adds a
{{FutureCallback}} that calls {{releaseResources()}} on both the request
producer and response consumer. My understanding is that, because my response
type is {{Message<HttpResponse, Publisher<ByteBuffer>>}}, I need to call
{{FutureCallback#completed}} as soon as I've constructed a
{{Publisher<ByteBuffer>}} representing the response stream. The problem is that
when I complete this callback, the immediate call to {{releaseResources}}
causes the request (which is still streaming) to be cancelled.
Currently, the simplest way to solve this problem seems to be by using no-op
implementations of {{releaseResources}} in my reactive classes, but I'm not
sure that that's a proper solution. What do you think the path forward should
be here?
> Add support for Reactive Streams
> --------------------------------
>
> Key: HTTPCLIENT-1942
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1942
> Project: HttpComponents HttpClient
> Issue Type: Wish
> Components: HttpClient (async)
> Affects Versions: 5.0 Beta1
> Reporter: Ryan Schmitt
> Priority: Major
> Labels: stuck, volunteers-wanted
> Fix For: Future
>
>
> It would be very helpful to me if the Apache client provided an
> implementation of the [Reactive Streams|http://www.reactive-streams.org/]
> spec, particularly as an implementation of the standard
> [interfaces|https://search.maven.org/artifact/org.reactivestreams/reactive-streams/1.0.2/jar].
> These interfaces are JDK6-compatible and have no other dependencies, but
> they unlock interoperability with many other frameworks, such as RxJava.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]