pgmq4s

package pgmq4s

Members list

Type members

Classlikes

object BatchSize

Maximum number of messages to read in a single read call.

Maximum number of messages to read in a single read call.

Use BatchSize.apply for validated construction, BatchSize.unsafe when the value is known to be valid, or the n.messages inline extension for compile-time literal checks.

Attributes

Source
models.scala
Supertypes
class Object
trait Matchable
class Any
Self type
BatchSize.type
enum Message[P, +H]

A message read from a PGMQ queue.

A message read from a PGMQ queue.

Type parameters

H

headers type (covariant; Nothing when no headers are present)

P

payload type

Attributes

Source
models.scala
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class Plain[A]
object MessageId

Message identifier, wrapping a Long assigned by PGMQ.

Message identifier, wrapping a Long assigned by PGMQ.

Attributes

Source
models.scala
Supertypes
class Object
trait Matchable
class Any
Self type
MessageId.type
case class NotifyThrottle(queueName: QueueName, throttleInterval: ThrottleInterval, lastNotifiedAt: OffsetDateTime)

Row returned by pgmq.list_notify_insert_throttles.

Row returned by pgmq.list_notify_insert_throttles.

Attributes

Source
models.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait PgmqAdmin[F[_]] extends PgmqAdminBackend[F]

Tagless-final algebra for PGMQ queue management and observability.

Tagless-final algebra for PGMQ queue management and observability.

Provides create, drop, purge, metrics, listing, and topic management operations. Each database backend supplies a concrete implementation (e.g. DoobiePgmqAdmin, SkunkPgmqAdmin).

Type parameters

F

effect type with Functor capabilities

Attributes

Source
PgmqAdmin.scala
Supertypes
trait PgmqAdminBackend[F]
class Object
trait Matchable
class Any
trait PgmqAdminBackend[F[_]]

Protected backend interface for raw queue management operations. Implemented by each database backend; not intended for direct use.

Protected backend interface for raw queue management operations. Implemented by each database backend; not intended for direct use.

Attributes

Source
PgmqAdminBackend.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait PgmqAdmin[F]
trait PgmqBackend[F[_]]

Protected backend interface for raw (String-level) message operations. Implemented by each database backend; not intended for direct use.

Protected backend interface for raw (String-level) message operations. Implemented by each database backend; not intended for direct use.

Attributes

Source
PgmqBackend.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait PgmqClient[F]
trait PgmqClient[F[_]] extends PgmqBackend[F]

Tagless-final algebra for PGMQ message operations.

Tagless-final algebra for PGMQ message operations.

Provides typed send, read, pop, archive, delete, and visibility-timeout methods. Each database backend (Doobie, Skunk, Anorm, Slick) supplies a concrete implementation.

Type parameters

F

effect type with MonadThrow capabilities

Attributes

Source
PgmqClient.scala
Supertypes
trait PgmqBackend[F]
class Object
trait Matchable
class Any
trait PgmqCodec[A] extends PgmqEncoder[A], PgmqDecoder[A]

Combined PgmqEncoder and PgmqDecoder for type A.

Combined PgmqEncoder and PgmqDecoder for type A.

Attributes

Companion
object
Source
codecs.scala
Supertypes
trait PgmqDecoder[A]
trait PgmqEncoder[A]
class Object
trait Matchable
class Any
object PgmqCodec

Attributes

Companion
trait
Source
codecs.scala
Supertypes
class Object
trait Matchable
class Any
Self type
PgmqCodec.type
trait PgmqDecoder[A]

Typeclass for decoding JSON strings to values of type A. Bridge modules (e.g. pgmq4s.circe) provide given instances that derive PgmqDecoder from the library's own decoder.

Typeclass for decoding JSON strings to values of type A. Bridge modules (e.g. pgmq4s.circe) provide given instances that derive PgmqDecoder from the library's own decoder.

Attributes

Companion
object
Source
codecs.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait PgmqCodec[A]
object PgmqDecoder

Attributes

Companion
trait
Source
codecs.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait PgmqEncoder[A]

Typeclass for encoding values of type A to JSON strings. Bridge modules (e.g. pgmq4s.circe) provide given instances that derive PgmqEncoder from the library's own encoder.

Typeclass for encoding values of type A to JSON strings. Bridge modules (e.g. pgmq4s.circe) provide given instances that derive PgmqEncoder from the library's own encoder.

Attributes

Companion
object
Source
codecs.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait PgmqCodec[A]
object PgmqEncoder

Attributes

Companion
trait
Source
codecs.scala
Supertypes
class Object
trait Matchable
class Any
Self type
case class QueueInfo(queueName: QueueName, isPartitioned: Boolean, isUnlogged: Boolean, createdAt: OffsetDateTime)

Queue metadata returned by pgmq.list_queues.

Queue metadata returned by pgmq.list_queues.

Attributes

Source
models.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class QueueMetrics(queueName: QueueName, queueLength: Long, newestMsgAgeSec: Option[Long], oldestMsgAgeSec: Option[Long], totalMessages: Long, scrapeTime: OffsetDateTime)

Queue-level statistics returned by pgmq.metrics.

Queue-level statistics returned by pgmq.metrics.

Attributes

Source
models.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object QueueName

Queue name, wrapping a plain String.

Queue name, wrapping a plain String.

Attributes

Source
models.scala
Supertypes
class Object
trait Matchable
class Any
Self type
QueueName.type
case class RawMessage(msgId: Long, readCt: Int, enqueuedAt: OffsetDateTime, lastReadAt: Option[OffsetDateTime], vt: OffsetDateTime, message: String, headers: Option[String])

Internal DTO representing a raw database row before JSON decoding.

Internal DTO representing a raw database row before JSON decoding.

Attributes

Source
models.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object RoutingKey

Routing key for topic-based message delivery (e.g. "orders.eu.created").

Routing key for topic-based message delivery (e.g. "orders.eu.created").

Attributes

Source
models.scala
Supertypes
class Object
trait Matchable
class Any
Self type
RoutingKey.type
case class RoutingMatch(pattern: TopicPattern, queueName: QueueName, compiledRegex: String)

Result row from pgmq.test_routing, showing which queues match a routing key.

Result row from pgmq.test_routing, showing which queues match a routing key.

Attributes

Source
models.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Throttle interval for NOTIFY triggers — minimum time between notifications.

Throttle interval for NOTIFY triggers — minimum time between notifications.

 ThrottleInterval(250.millis)

Attributes

Source
models.scala
Supertypes
class Object
trait Matchable
class Any
Self type
case class TopicMessageId(queueName: QueueName, id: MessageId)

Result row from pgmq.send_batch_topic, pairing a queue with its message ID.

Result row from pgmq.send_batch_topic, pairing a queue with its message ID.

Attributes

Source
models.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TopicPattern

Binding pattern with * (single segment) and # (zero or more) wildcards.

Binding pattern with * (single segment) and # (zero or more) wildcards.

Attributes

Source
models.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Visibility timeout — how long a read message is hidden from other consumers.

Visibility timeout — how long a read message is hidden from other consumers.

Constructed from a scala.concurrent.duration.FiniteDuration:

 VisibilityTimeout(30.seconds)

Attributes

Source
models.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Types

opaque type BatchSize

Attributes

Source
models.scala
opaque type MessageId

Attributes

Source
models.scala
opaque type QueueName

Attributes

Source
models.scala
opaque type RoutingKey

Attributes

Source
models.scala
opaque type ThrottleInterval

Attributes

Source
models.scala
opaque type TopicPattern

Attributes

Source
models.scala
opaque type VisibilityTimeout

Attributes

Source
models.scala

Extensions

Extensions

extension (n: Int)
inline def messages: BatchSize

Construct a BatchSize from an integer literal with a compile-time positivity check.

Construct a BatchSize from an integer literal with a compile-time positivity check.

Example: 10.messages

Attributes

Source
models.scala