class Channel extends AnyRef
Thread-safe access to a RabbitMQ Channel
- Alphabetic
- By Inheritance
- Channel
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ack(deliveryTag: DeliveryTag, multiple: Boolean = false): ZIO[Any, Throwable, Unit]
- def ackMany(deliveryTags: Seq[DeliveryTag]): ZIO[Any, Throwable, Unit]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def basicQos(count: Int, global: Boolean = false): ZIO[Any, Throwable, Unit]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def consume(queue: QueueName, consumerTag: ConsumerTag, autoAck: Boolean = false): ZStream[Any, Throwable, Delivery]
Consume a stream of messages from a queue
Consume a stream of messages from a queue
When the stream is completed, the AMQP consumption is cancelled
- def consumerCount(queue: QueueName): ZIO[Any, Throwable, Long]
Returns the number of consumers on a queue.
Returns the number of consumers on a queue. This method assumes the queue exists. If it doesn't, the channel will be closed with an exception.
- queue
the name of the queue
- returns
the number of consumers
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exchangeDeclare(exchange: ExchangeName, type: ExchangeType, durable: Boolean = false, autoDelete: Boolean = false, internal: Boolean = false, arguments: Map[String, AnyRef] = Map.empty): ZIO[Any, Throwable, Unit]
- def exchangeDelete(exchange: ExchangeName, ifUnused: Boolean = false): ZIO[Any, Throwable, Unit]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def messageCount(queue: QueueName): ZIO[Any, Throwable, Long]
Returns the number of messages in a queue ready to be delivered to consumers.
Returns the number of messages in a queue ready to be delivered to consumers. This method assumes the queue exists. If it doesn't, the channels will be closed with an exception.
- queue
the name of the queue
- returns
the number of messages in ready state
- def nack(deliveryTag: DeliveryTag, requeue: Boolean = false, multiple: Boolean = false): ZIO[Any, Throwable, Unit]
- def nackMany(deliveryTags: Seq[DeliveryTag], requeue: Boolean = false): ZIO[Any, Throwable, Unit]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def publish(exchange: ExchangeName, body: Array[Byte], routingKey: RoutingKey = zio.prelude.Newtype.unsafeWrap[zio.amqp.model.RoutingKey.type](zio.amqp.model.`package`.RoutingKey)(""), mandatory: Boolean = false, immediate: Boolean = false, props: BasicProperties = new AMQP.BasicProperties()): ZIO[Any, Throwable, Unit]
- def purgeQueue(queue: QueueName): ZIO[Any, Throwable, PurgeOk]
Purges the contents of the given queue.
Purges the contents of the given queue.
- queue
the name of the queue
- returns
purge-confirm if the purge was executed successfully
- def queueBind(queue: QueueName, exchange: ExchangeName, routingKey: RoutingKey, arguments: Map[String, AnyRef] = Map.empty): ZIO[Any, Throwable, Unit]
- def queueDeclare(queue: QueueName, durable: Boolean = false, exclusive: Boolean = false, autoDelete: Boolean = false, arguments: Map[String, AnyRef] = Map.empty): ZIO[Any, Throwable, String]
Declare a queue
Declare a queue
- queue
Name of the queue. If left empty, a random queue name is used
- durable
True if we are declaring a durable queue (the queue will survive a server restart)
- exclusive
Exclusive to this connection
- autoDelete
True if we are declaring an autodelete queue (server will delete it when no longer in use)
- returns
The name of the created queue
- def queueDeclarePassive(queue: QueueName): ZIO[Any, Throwable, DeclareOk]
Check if a queue exists
Check if a queue exists
- queue
Name of the queue.
- returns
a declaration-confirm method to indicate the queue exists
- def queueDelete(queue: QueueName, ifUnused: Boolean = false, ifEmpty: Boolean = false): ZIO[Any, Throwable, Unit]
Delete a queue
Delete a queue
- queue
Name of the queue
- ifUnused
True if the queue should be deleted only if not in use
- ifEmpty
True if the queue should be deleted only if empty
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])