pgmq-hasql-0.6.0.0: src/Pgmq.hs
module Pgmq
( -- * Queue Management
createQueue,
dropQueue,
createPartitionedQueue,
createPartitionedQueueWithPremake,
createUnloggedQueue,
detachArchive, -- DEPRECATED: no-op, will be removed in pgmq 2.0
-- ** Notifications (pgmq 1.7.0+)
enableNotifyInsert,
disableNotifyInsert,
-- * Message Operations
sendMessage,
sendMessageForLater,
batchSendMessage,
batchSendMessageForLater,
-- ** With Headers (pgmq 1.5.0+)
sendMessageWithHeaders,
sendMessageWithHeadersForLater,
batchSendMessageWithHeaders,
batchSendMessageWithHeadersForLater,
readMessage,
deleteMessage,
batchDeleteMessages,
archiveMessage,
batchArchiveMessages,
deleteAllMessagesFromQueue,
changeVisibilityTimeout,
batchChangeVisibilityTimeout, -- pgmq 1.8.0+
-- ** Timestamp-based VT (pgmq 1.10.0+)
setVisibilityTimeoutAt,
batchSetVisibilityTimeoutAt,
listQueues,
listQueuesUnvalidated,
listFifoIndexQueueNames,
readWithPoll,
pop,
queueMetrics,
allQueueMetrics,
-- * FIFO / Grouped Reads
-- | Head reads (PGMQ 1.12+) lease at most one absolute head per group.
-- An invisible head blocks its group; expiry makes that same head eligible.
-- Polling occupies a database connection. Leases do not guarantee exactly-once processing.
readGrouped,
readGroupedWithPoll,
readGroupedRoundRobin,
readGroupedRoundRobinWithPoll,
readGroupedHead,
readGroupedHeadWithPoll,
ReadGrouped (..),
ReadGroupedWithPoll (..),
-- * Topic Routing (pgmq 1.11.0+)
-- ** Topic Management
bindTopic,
unbindTopic,
validateRoutingKey,
validateTopicPattern,
testRouting,
listTopicBindings,
listTopicBindingsForQueue,
-- ** Topic Sending
sendTopic,
sendTopicWithHeaders,
batchSendTopic,
batchSendTopicForLater,
batchSendTopicWithHeaders,
batchSendTopicWithHeadersForLater,
-- ** Notification Management
listNotifyInsertThrottles,
updateNotifyInsert,
-- * Types
MessageBody (..),
MessageHeaders (..),
MessageId (..),
Message (..),
Queue (..),
UnvalidatedQueue (..),
QueueName,
SendMessage (..),
SendMessageForLater (..),
BatchSendMessage (..),
BatchSendMessageForLater (..),
-- ** With Headers (pgmq 1.5.0+)
SendMessageWithHeaders (..),
SendMessageWithHeadersForLater (..),
BatchSendMessageWithHeaders (..),
BatchSendMessageWithHeadersForLater (..),
ReadMessage (..),
PopMessage (..),
EnableNotifyInsert (..), -- pgmq 1.7.0+
MessageQuery (..),
BatchMessageQuery (..),
VisibilityTimeoutQuery (..),
BatchVisibilityTimeoutQuery (..), -- pgmq 1.8.0+
-- ** Timestamp-based VT types (pgmq 1.10.0+)
VisibilityTimeoutAtQuery (..),
BatchVisibilityTimeoutAtQuery (..),
ReadWithPollMessage (..),
CreatePartitionedQueue (..),
QueueMetrics (..),
-- ** Topic types (pgmq 1.11.0+)
RoutingKey,
parseRoutingKey,
routingKeyToText,
TopicPattern,
parseTopicPattern,
topicPatternToText,
TopicBinding (..),
RoutingMatch (..),
TopicSendResult (..),
NotifyInsertThrottle (..),
notifyChannelName,
BindTopic (..),
UnbindTopic (..),
SendTopic (..),
SendTopicWithHeaders (..),
BatchSendTopic (..),
BatchSendTopicForLater (..),
BatchSendTopicWithHeaders (..),
BatchSendTopicWithHeadersForLater (..),
UpdateNotifyInsert (..),
-- * Queue Name Utilities
parseQueueName,
queueNameToText,
)
where
import Pgmq.Hasql.Sessions
( allQueueMetrics,
archiveMessage,
batchArchiveMessages,
batchChangeVisibilityTimeout,
batchDeleteMessages,
batchSendMessage,
batchSendMessageForLater,
batchSendMessageWithHeaders,
batchSendMessageWithHeadersForLater,
batchSendTopic,
batchSendTopicForLater,
batchSendTopicWithHeaders,
batchSendTopicWithHeadersForLater,
batchSetVisibilityTimeoutAt,
bindTopic,
changeVisibilityTimeout,
createPartitionedQueue,
createPartitionedQueueWithPremake,
createQueue,
createUnloggedQueue,
deleteAllMessagesFromQueue,
deleteMessage,
detachArchive,
disableNotifyInsert,
dropQueue,
enableNotifyInsert,
listFifoIndexQueueNames,
listNotifyInsertThrottles,
listQueues,
listQueuesUnvalidated,
listTopicBindings,
listTopicBindingsForQueue,
pop,
queueMetrics,
readGrouped,
readGroupedHead,
readGroupedHeadWithPoll,
readGroupedRoundRobin,
readGroupedRoundRobinWithPoll,
readGroupedWithPoll,
readMessage,
readWithPoll,
sendMessage,
sendMessageForLater,
sendMessageWithHeaders,
sendMessageWithHeadersForLater,
sendTopic,
sendTopicWithHeaders,
setVisibilityTimeoutAt,
testRouting,
unbindTopic,
updateNotifyInsert,
validateRoutingKey,
validateTopicPattern,
)
import Pgmq.Hasql.Statements.Types
( BatchMessageQuery (..),
BatchSendMessage (..),
BatchSendMessageForLater (..),
BatchSendMessageWithHeaders (..),
BatchSendMessageWithHeadersForLater (..),
BatchSendTopic (..),
BatchSendTopicForLater (..),
BatchSendTopicWithHeaders (..),
BatchSendTopicWithHeadersForLater (..),
BatchVisibilityTimeoutAtQuery (..),
BatchVisibilityTimeoutQuery (..),
BindTopic (..),
CreatePartitionedQueue (..),
EnableNotifyInsert (..),
MessageQuery (..),
PopMessage (..),
QueueMetrics (..),
ReadGrouped (..),
ReadGroupedWithPoll (..),
ReadMessage (..),
ReadWithPollMessage (..),
SendMessage (..),
SendMessageForLater (..),
SendMessageWithHeaders (..),
SendMessageWithHeadersForLater (..),
SendTopic (..),
SendTopicWithHeaders (..),
UnbindTopic (..),
UpdateNotifyInsert (..),
VisibilityTimeoutAtQuery (..),
VisibilityTimeoutQuery (..),
)
import Pgmq.Types
( Message (..),
MessageBody (..),
MessageHeaders (..),
MessageId (..),
NotifyInsertThrottle (..),
Queue (..),
QueueName,
RoutingKey,
RoutingMatch (..),
TopicBinding (..),
TopicPattern,
TopicSendResult (..),
UnvalidatedQueue (..),
notifyChannelName,
parseQueueName,
parseRoutingKey,
parseTopicPattern,
queueNameToText,
routingKeyToText,
topicPatternToText,
)