java.lang.Object
org.apache.camel.component.reactive.streams.engine.CamelPublisher
All Implemented Interfaces:
AutoCloseable, org.reactivestreams.Publisher<org.apache.camel.Exchange>

public class CamelPublisher extends Object implements org.reactivestreams.Publisher<org.apache.camel.Exchange>, AutoCloseable
The Camel publisher. It forwards Camel exchanges to external reactive-streams subscribers.
  • Constructor Details

    • CamelPublisher

      public CamelPublisher(ExecutorService workerPool, org.apache.camel.CamelContext context, String name)
  • Method Details

    • subscribe

      public void subscribe(org.reactivestreams.Subscriber<? super org.apache.camel.Exchange> subscriber)
      Specified by:
      subscribe in interface org.reactivestreams.Publisher<org.apache.camel.Exchange>
    • unsubscribe

      public void unsubscribe(CamelSubscription subscription)
    • publish

      public void publish(org.apache.camel.Exchange data)
    • attachProducer

      public void attachProducer(ReactiveStreamsProducer producer)
    • detachProducer

      public void detachProducer()
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • getSubscriptions

      public List<CamelSubscription> getSubscriptions()