Class RabbitQueue

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class RabbitQueue
    extends Object
    implements Closeable
    Simple structure representing the data of a RabbitMQ queue, i.e., the Channel and the name.
    Author:
    Michael Röder (roeder@informatik.uni-leipzig.de)
    • Field Detail

      • channel

        public final com.rabbitmq.client.Channel channel
        Channel of this queue.
      • name

        public final String name
        Name of this queue.
    • Constructor Detail

      • RabbitQueue

        public RabbitQueue​(com.rabbitmq.client.Channel channel,
                           String name)
        Constructor.
        Parameters:
        channel - Channel of this queue.
        name - Name of this queue.
    • Method Detail

      • getChannel

        public com.rabbitmq.client.Channel getChannel()
      • getName

        public String getName()
      • messageCount

        public long messageCount()
        Returns number of available messages or 0 if an error occurred.
        Returns:
        the number of available messages.