chore(deps): update dependency @sebbo2002/semantic-release-jsr to v2 #540
GitHub Actions / Test Results (20.x
succeeded
Dec 16, 2024 in 0s
91 passed, 0 failed and 0 skipped
β Β test-results.json
91 tests were completed in 234ms with 91 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
test/tests/consumer.test.ts | 91β | 91ms |
β Β test/tests/consumer.test.ts
Consumer .create
β
creates a new instance of a Consumer object
Consumer .start
β
ack all messages if handleMessageBatch returns void
β
ack only returned messages if handleMessagesBatch returns an array
β
ack the message if handleMessage returns a message with the same ID
β
ack the message if handleMessage returns void
β
calls deleteMessageBatch if alwaysAcknowledge is `true` and handleMessagesBatch returns an empty array
β
calls the handleMessage function when a message is received
β
calls the handleMessagesBatch function when a batch of messages is received
β
calls the preReceiveMessageCallback and postReceiveMessageCallback function before receiving a message
β
changes message visibility timeout on processing error
β
consumes another message once one is processed
β
consumes messages with message attribute 'ApproximateReceiveCount'
β
consumes multiple messages when the batchSize is greater than 1
β
deletes the message if alwaysAcknowledge is `true` and handleMessage returns an empty object
β
deletes the message when the handleMessage function is called
β
does not ack the message if handleMessage returns a different ID
β
does not ack the message if handleMessage returns an empty object
β
does not call deleteMessageBatch if handleMessagesBatch returns an empty array
β
does not delete the message if shouldDeleteMessages is false
β
does not include the response and metadata in the error when extendedAWSErrors is false
β
does not terminate visibility timeout when `terminateVisibilityTimeout` option is false
β
doesn't consume more messages when called multiple times
β
doesn't consume more messages when called multiple times after stopped
β
doesn't delete the message when a processing error is reported
β
emit error when changing visibility timeout fails
β
emit error when changing visibility timeout fails for batch handler functions
β
fires a `processing_error` event when a non-`SQSError` error occurs processing a message
β
fires a message_processed event when a message is successfully deleted
β
fires a message_received event when a message is received
β
fires a timeout event if handler function takes too long
β
fires an `error` event when an `SQSError` occurs processing a message
β
fires an emptyQueue event when all messages have been consumed
β
fires an error event when an error occurs deleting a message
β
fires an error event when an error occurs receiving a message
β
fires an event when the consumer is started
β
fires error event when failed to terminate visibility timeout on processing error
β
fires response_processed event for each batch
β
handles non-standard exceptions thrown by the handler batch function
β
handles non-standard exceptions thrown by the handler function
β
handles non-standard objects thrown by the handler batch function
β
handles non-standard objects thrown by the handler function
β
handles unexpected exceptions thrown by the handler batch function
β
handles unexpected exceptions thrown by the handler function
β
includes the response and metadata in the error when "extendedAWSErrors" is true
β
passes in the correct visibility timeout for long running batch handler functions
β
prefers handleMessagesBatch over handleMessage when both are set
β
retains sqs error information
β
terminate message visibility timeout on processing error
β
uses the correct abort signal
β
uses the correct visibility timeout for long running handler functions
β
waits before repolling when a 403 error occurs
β
waits before repolling when a credentials error occurs
β
waits before repolling when a CredentialsProviderError error occurs
β
waits before repolling when a InvalidAddress error occurs
β
waits before repolling when a InvalidSecurity error occurs
β
waits before repolling when a NonExistentQueue error occurs
β
waits before repolling when a polling timeout is set
β
waits before repolling when a QueueDoesNotExist error occurs
β
waits before repolling when a RequestThrottled error occurs
β
waits before repolling when a RequestThrottled error occurs
β
waits before repolling when a UnknownEndpoint error occurs
Consumer .stop
β
aborts requests when the abort param is true
β
clears the polling timeout when stopped
β
fires a stopped event a second time if started and stopped twice
β
fires a stopped event only once when stopped multiple times
β
stops the consumer polling for messages
β
waits for in-flight messages before emitting stopped (timeout reached)
β
waits for in-flight messages before emitting stopped (within timeout)
Consumer event listeners
β
fires the event multiple times
β
fires the events only once
Consumer logger
β
logs a debug event when an event is emitted
Consumer options validation
β
requires a handleMessage or handleMessagesBatch function to be set
β
requires heartbeatInterval to be less than visibilityTimeout
β
requires the batchSize option to be greater than 0
β
requires the batchSize option to be no greater than 10
β
requires visibilityTimeout to be set with heartbeatInterval
Consumer status
β
returns false for `isRunning` if the consumer has been stopped
β
returns the defaults before the consumer is started
β
returns true for `isPolling` if the consumer is polling for messages
β
returns true for `isRunning` if the consumer has not been stopped
Consumer updateOption
β
does not update the batchSize if the value is less than 0
β
does not update the batchSize if the value is less than 1
β
does not update the batchSize if the value is more than 10
β
does not update the batchSize if the value is more than 20
β
does not update the pollingWaitTimeMs if the value is less than 0
β
does not update the visibilityTimeout if the value is less than the heartbeatInterval
β
throws an error for an unknown option
β
updates the batchSize option and emits an event
β
updates the pollingWaitTimeMs option and emits an event
β
updates the visibilityTimeout option and emits an event
β
updates the waitTimeSeconds option and emits an event
Loading