Interface ExchangeFactory

    • Method Detail

      • getConsumer

        Consumer getConsumer()
        The consumer using this factory.
      • create

        Exchange create​(boolean autoRelease)
        Gets a new Exchange
        Parameters:
        autoRelease - whether to auto release the exchange when routing is complete via UnitOfWork
      • create

        Exchange create​(Endpoint fromEndpoint,
                        boolean autoRelease)
        Gets a new Exchange
        Parameters:
        autoRelease - whether to auto release the exchange when routing is complete via UnitOfWork
        fromEndpoint - the from endpoint
      • release

        default boolean release​(Exchange exchange)
        Releases the exchange back into the pool
        Specified by:
        release in interface PooledObjectFactory<Exchange>
        Parameters:
        exchange - the exchange
        Returns:
        true if released into the pool, or false if something went wrong and the exchange was discarded