Interface ProducerCache.AsyncProducerCallback

Enclosing interface:
ProducerCache

public static interface ProducerCache.AsyncProducerCallback
Callback for sending a exchange message to a endpoint using an AsyncProcessor capable producer.

Using this callback as a template pattern ensures that Camel handles the resource handling and will start and stop the given producer, to avoid resource leaks.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    doInAsyncProducer(AsyncProducer asyncProducer, Exchange exchange, AsyncCallback callback)
    Performs operation on the given producer to send the given exchange.
  • Method Details

    • doInAsyncProducer

      boolean doInAsyncProducer(AsyncProducer asyncProducer, Exchange exchange, AsyncCallback callback)
      Performs operation on the given producer to send the given exchange.
      Parameters:
      asyncProducer - the async producer, is never null
      exchange - the exchange to process
      callback - the async callback
      Returns:
      (doneSync) true to continue execute synchronously, false to continue being executed asynchronously