| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Runtime.Queue.Sqs.Internal
Description
The tuning fields, the message lifting and the dead-letter probe behind
Ecluse.Runtime.Queue.Sqs, which documents the backend and re-exports the curated surface.
Importing this module opts out of that stability promise, the convention text and bytestring
use, so production code imports the public one.
Synopsis
- data SqsConfig = SqsConfig {
- sqsQueueUrl :: Text
- sqsRegion :: Text
- sqsEndpoint :: Maybe AwsEndpoint
- sqsBatchSize :: Int
- sqsWaitSeconds :: Int
- sqsVisibilityTimeout :: Seconds
- sqsTerminalBackoff :: Seconds
- sqsMaxReceiveCount :: DeliveryBudget
- defaultSqsConfig :: Text -> Text -> SqsConfig
- newSqsQueue :: LogEnv -> (Text -> Either Text RegistryUrl) -> SqsConfig -> IO MirrorQueue
- data ReceivedMessage = ReceivedMessage {}
- liftReceivedMessages :: LogEnv -> (Text -> Either Text RegistryUrl) -> ReceiptLease -> [ReceivedMessage] -> IO [QueueMessage]
- deadLetterTerminusOf :: Maybe Text -> DeadLetterTerminus
- mirrorJobPackage :: Ecosystem -> Maybe Text -> Text -> Either Text PackageName
Configuration
What the SQS backend needs. The provider knobs take their defaults from
defaultSqsConfig (see Ecluse.Core.Queue).
Constructors
| SqsConfig | |
Fields
| |
defaultSqsConfig :: Text -> Text -> SqsConfig Source #
A SqsConfig for a queue URL and region, with the provider knobs at their defaults.
The backend
newSqsQueue :: LogEnv -> (Text -> Either Text RegistryUrl) -> SqsConfig -> IO MirrorQueue Source #
Build an SQS-backed MirrorQueue. The amazonka Env is built once here and
the returned handle's closures capture it.
Received-message lifting
data ReceivedMessage Source #
The fields of a received SQS message the backend reads. Lifting them out of the
amazonka Message keeps the QueueMessage mapping free of the AWS type.
Constructors
| ReceivedMessage | |
Fields
| |
Instances
| Show ReceivedMessage Source # | |
Defined in Ecluse.Runtime.Queue.Sqs.Internal Methods showsPrec :: Int -> ReceivedMessage -> ShowS # show :: ReceivedMessage -> String # showList :: [ReceivedMessage] -> ShowS # | |
| Eq ReceivedMessage Source # | |
Defined in Ecluse.Runtime.Queue.Sqs.Internal Methods (==) :: ReceivedMessage -> ReceivedMessage -> Bool # (/=) :: ReceivedMessage -> ReceivedMessage -> Bool # | |
liftReceivedMessages :: LogEnv -> (Text -> Either Text RegistryUrl) -> ReceiptLease -> [ReceivedMessage] -> IO [QueueMessage] Source #
Lift a received batch into deliverable QueueMessages under one poll's lease. A drop is
logged, omitted, and left un-acked, so redelivery and dead-letter behaviour are unchanged.
Dead-letter probe
deadLetterTerminusOf :: Maybe Text -> DeadLetterTerminus Source #
Classify a queue's raw RedrivePolicy into its dead-letter terminus. No policy or a
blank one is absent, and any other is attached, with maxReceiveCount only when it reads.