Replace various Processor.create calls with their Sinks equivalent

Proprietary

As of 3.5 Processors are deprecated and Sinks are preferred.

org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes
mod run . --recipe=org.openrewrite.reactive.reactor.ReactorProcessorCreateToSinkRecipes

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Replace MonoProcessor.create() with Sinks.one()
  2. Replace ReplayProcessor.create() with Sinks.many().replay().all()
  3. Replace ReplayProcessor.create(int) with Sinks.many().replay().limit(int)
  4. Replace ReplayProcessor.create(int, false) with Sinks.many().replay().limit(int)
  5. Replace ReplayProcessor.create(int, true) with Sinks.many().replay().all(int)
  6. Replace ReplayProcessor.createSizeAndTimeout(int, Duration) with Sinks.many().replay().limit(int, duration)
  7. Replace ReplayProcessor.createSizeAndTimeout(int, Duration, Scheduler) with Sinks.many().replay().limit(int, Duration, Scheduler)
  8. Replace ReplayProcessor.createTimeout(Duration) with Sinks.many().replay().limit(duration)
  9. Replace ReplayProcessor.createTimeout(Duration, Scheduler) with Sinks.many().replay().limit(Duration, Scheduler)
  10. Replace DirectProcessor.create() with Sinks.many().multicast().directBestEffort()
  11. Replace EmitterProcessor.create() with Sinks.many().multicast().onBackpressureBuffer()
  12. Replace EmitterProcessor.create(Boolean) with Sinks.many().multicast().onBackpressureBuffer(Queues.SMALL_BUFFER_SIZE, Boolean)
  13. Replace EmitterProcessor.create(int) with Sinks.many().multicast().onBackpressureBuffer(int)
  14. Replace EmitterProcessor.create(int, Boolean) with Sinks.many().multicast().onBackpressureBuffer(int, Boolean)
  15. Replace UnicastProcessor.create() with Sinks.many().unicast().onBackpressureBuffer()
  16. Replace UnicastProcessor.create(Queue) with Sinks.many().unicast().onBackpressureBuffer(Queue)
  17. Replace UnicastProcessor.create(Queue, Disposable) with Sinks.many().unicast().onBackpressureBuffer(Queue, Disposable)
  18. Replace UnicastProcessor.create(Queue, Consumer, Disposable) with Sinks.many().unicast().onBackpressureBuffer(Queue, Disposable)