lhotari edited a comment on issue #10437:
URL: https://github.com/apache/pulsar/issues/10437#issuecomment-870008599


   > @lhotari hey, I want to contribute towards reactor client, is there any 
development currently going on?
   
   @MaxHub I'll soon have time to focus on an adapter library which adapts the 
existing Pulsar Java Client's Async API to Project Reactor / Reactive Streams. 
Such an adapter library is fairly simple to implement when the goal isn't to 
implement a purely reactive library and the requirements are relaxed. 
   
   There are a few areas which might need some changes to the Java Client. One 
of such is the producer backpressure solution. The [Java client "signals" 
producer backpressure with 
exceptions](https://github.com/apache/pulsar/blob/34a04b5fa4692cb4716df61e740795467f76451b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java#L754-L780)
 such as PulsarClientException.ProducerQueueIsFullError and 
PulsarClientException.MemoryBufferIsFullError. It should be possible to adapt 
this to the Reactive wrapper, but it's not very optimal. 
   One detail around "relaxed" reactive streams adaptation: Initially I was 
thinking of ignoring the requested demand (Subscription's `request(long n)`) 
completely.
   
   Consumer backpressure doesn't require any special tricks in the adapter 
library when the requested demand is ignored. 
   
   I have previously implemented such an adapter library for Pulsar. I was 
planning to reimplement a clean room implementation from scratch so that there 
wouldn't be copyright issues. There would also be the possibility to rethink 
the design while reimplementing it. 
   
   I think that a good starting point would be to start from the design 
decisions and examples around the API and implemention.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to