Class RabbitConnectionFactory

java.lang.Object
io.micronaut.rabbitmq.connect.RabbitConnectionFactory
All Implemented Interfaces:
io.micronaut.context.event.BeanPreDestroyEventListener<ExecutorService>, EventListener

@Factory public class RabbitConnectionFactory extends Object implements io.micronaut.context.event.BeanPreDestroyEventListener<ExecutorService>
A factory for creating a connection to RabbitMQ.
Since:
1.1.0
Author:
James Kleeh
  • Constructor Details

    • RabbitConnectionFactory

      public RabbitConnectionFactory()
  • Method Details

    • onPreDestroy

      @NonNull public @NonNull ExecutorService onPreDestroy(@NonNull @NonNull io.micronaut.context.event.BeanPreDestroyEvent<ExecutorService> event)
      Closes active connections associated with the ExecutorService prior to its removal.
      Specified by:
      onPreDestroy in interface io.micronaut.context.event.BeanPreDestroyEventListener<ExecutorService>
      Parameters:
      event - The bean created event
      Returns:
      The unmodified ExecutorService bean