Class BatchingRabbitTemplate

    • Constructor Detail

      • BatchingRabbitTemplate

        public BatchingRabbitTemplate​(BatchingStrategy batchingStrategy,
                                      org.springframework.scheduling.TaskScheduler scheduler)
        Create an instance with the supplied parameters.
        Parameters:
        batchingStrategy - the batching strategy.
        scheduler - the scheduler.
      • BatchingRabbitTemplate

        public BatchingRabbitTemplate​(ConnectionFactory connectionFactory,
                                      BatchingStrategy batchingStrategy,
                                      org.springframework.scheduling.TaskScheduler scheduler)
        Create an instance with the supplied parameters.
        Parameters:
        connectionFactory - the connection factory.
        batchingStrategy - the batching strategy.
        scheduler - the scheduler.
        Since:
        2.2
    • Method Detail

      • send

        public void send​(java.lang.String exchange,
                         java.lang.String routingKey,
                         org.springframework.amqp.core.Message message,
                         CorrelationData correlationData)
                  throws org.springframework.amqp.AmqpException
        Description copied from interface: RabbitOperations
        Send a message to a specific exchange with a specific routing key.
        Specified by:
        send in interface RabbitOperations
        Overrides:
        send in class RabbitTemplate
        Parameters:
        exchange - the name of the exchange
        routingKey - the routing key
        message - a message to send
        correlationData - data to correlate publisher confirms.
        Throws:
        org.springframework.amqp.AmqpException - if there is a problem
      • flush

        public void flush()
        Flush any partial in-progress batches.