QueueConsumer

io.github.positionpal.consumer.QueueConsumer
object QueueConsumer

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

enum Exchange(val name: String, val exchangeType: String, val routingKey: Option[String], val durable: Boolean)

Represents an exchange declaration for RabbitMQ.

Represents an exchange declaration for RabbitMQ.

Value parameters

exchangeType

The type of the exchange (e.g., "direct", "topic", "headers").

name

The name of the exchange.

routingKey

An optional routing key for binding.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Queue(name: String, exchanges: List[Exchange], routingKey: Option[String])

Represents a queue configuration including its name, associated exchanges, and an optional routing key.

Represents a queue configuration including its name, associated exchanges, and an optional routing key.

Value parameters

exchanges

A list of exchanges associated with the queue.

name

The name of the queue.

routingKey

An optional routing key for message routing.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def create[F[_]](provider: AmqpConnectionProvider, queues: List[Queue], messageHandler: MessageHandler[F])(using system: ActorSystem[_]): RunnableGraph[NotUsed]

Starts the queue consumer by running the Akka Stream graph.

Starts the queue consumer by running the Akka Stream graph.

Type parameters

F

The effect type used by the MessageHandler.

Value parameters

messageHandler

A handler for processing messages based on their type.

provider

The AMQP connection provider used to connect to RabbitMQ.

queues

A list of queues to consume from, each with its associated configuration.

system

The Akka actor system used for running the stream.

Attributes

Returns

A RunnableGraph that can be executed to start the consumer.