← ZIO AMQP docs

Channel

zio.amqp.Channel
class Channel

Thread-safe access to a RabbitMQ Channel

Attributes

Source
Client.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def ack(deliveryTag: DeliveryTag, multiple: Boolean = ...): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def ackMany(deliveryTags: Seq[DeliveryTag]): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def basicQos(count: Int, global: Boolean = ...): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def consume(queue: QueueName, consumerTag: ConsumerTag, autoAck: Boolean = ...): 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

Attributes

Source
Client.scala
def consumerCount(queue: QueueName): ZIO[Any, Throwable, Long]

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.

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.

Value parameters

queue

the name of the queue

Attributes

Returns

the number of consumers

Source
Client.scala
def exchangeDeclare(exchange: ExchangeName, `type`: ExchangeType, durable: Boolean = ..., autoDelete: Boolean = ..., internal: Boolean = ..., arguments: Map[String, AnyRef] = ...): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def exchangeDelete(exchange: ExchangeName, ifUnused: Boolean = ...): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def messageCount(queue: QueueName): ZIO[Any, Throwable, Long]

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.

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.

Value parameters

queue

the name of the queue

Attributes

Returns

the number of messages in ready state

Source
Client.scala
def nack(deliveryTag: DeliveryTag, requeue: Boolean = ..., multiple: Boolean = ...): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def nackMany(deliveryTags: Seq[DeliveryTag], requeue: Boolean = ...): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def publish(exchange: ExchangeName, body: Array[Byte], routingKey: RoutingKey = ..., mandatory: Boolean = ..., immediate: Boolean = ..., props: BasicProperties = ...): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def purgeQueue(queue: QueueName): ZIO[Any, Throwable, PurgeOk]

Purges the contents of the given queue.

Purges the contents of the given queue.

Value parameters

queue

the name of the queue

Attributes

Returns

purge-confirm if the purge was executed successfully

Source
Client.scala
def queueBind(queue: QueueName, exchange: ExchangeName, routingKey: RoutingKey, arguments: Map[String, AnyRef] = ...): ZIO[Any, Throwable, Unit]

Attributes

Source
Client.scala
def queueDeclare(queue: QueueName, durable: Boolean = ..., exclusive: Boolean = ..., autoDelete: Boolean = ..., arguments: Map[String, AnyRef] = ...): ZIO[Any, Throwable, String]

Declare a queue

Declare a queue

Value parameters

autoDelete

True if we are declaring an autodelete queue (server will delete it when no longer in use)

durable

True if we are declaring a durable queue (the queue will survive a server restart)

exclusive

Exclusive to this connection

queue

Name of the queue. If left empty, a random queue name is used

Attributes

Returns

The name of the created queue

Source
Client.scala
def queueDeclarePassive(queue: QueueName): ZIO[Any, Throwable, DeclareOk]

Check if a queue exists

Check if a queue exists

Value parameters

queue

Name of the queue.

Attributes

Returns

a declaration-confirm method to indicate the queue exists

Source
Client.scala
def queueDelete(queue: QueueName, ifUnused: Boolean = ..., ifEmpty: Boolean = ...): ZIO[Any, Throwable, Unit]

Delete a queue

Delete a queue

Value parameters

ifEmpty

True if the queue should be deleted only if empty

ifUnused

True if the queue should be deleted only if not in use

queue

Name of the queue

Attributes

Source
Client.scala