public class SQSMessageRunnerServiceTest extends AbstractSQSMessageRunnerServiceTest
AbstractSQSMessageRunnerServiceTest.DefaultMessageRunner, AbstractSQSMessageRunnerServiceTest.DelegatingMessageRunnerCONCURRENT_CONSUMERS, MESSAGE_RUNNER_KEY, messageContextArgumentCaptor, messageInformationService, messageRunner, messageRunnerKeyToProducerMapper, messageRunnerService, messageValidatorRegistry, nestedMessageSerializer, payloads, QUEUE_NAME, queueUrl, RECEIVE_WAIT_TIME_SECONDS, receiveMessageRequestArgumentCaptor, registryService, sendMessageRequestArgumentCaptor, spyingSqsClient, sqsClient, sqsMessageVisibilityTimeoutManager, sqsServer, TENANT_ID, tenantContextBuilder, tenantContextProvider, tenantDataIdSupplier, tenantIdSetter, VERIFY_TIMEOUT_MILLIS, VISIBILITY_TIMEOUT_SECONDS, workContextDoorway| Constructor and Description |
|---|
SQSMessageRunnerServiceTest() |
getDefaultConsumerQueueConfig, getDefaultConsumerQueueConfig, getDefaultMessageRunnerKeyToProducerMapper, setUp, tearDownpublic void messagePayloadIsPassedToMessageRunner()
throws Exception
Exceptionpublic void messageIsAutoAcknowledgedAfterSuccessfulProcessing()
throws Exception
Exceptionpublic void addMessageWithEmptyPayload()
throws Exception
Exceptionpublic void addMessageWithNullPayload()
throws Exception
Exceptionpublic void addMultipleMessagesSerially()
throws Exception
Exceptionpublic void addMultipleMessagesConcurrently()
throws Exception
Exceptionpublic void messageNotDeletedIfRunningItThrowsAnException()
throws Exception
Exceptionpublic void receiveMessageRequestPerformedUsingConfiguredVisibilityTimeoutAndSchedulingBuffer()
throws Exception
Exceptionpublic void sentTimestampAttributeIsRequestedToAllowMessageLatencyToBeDerived()
throws Exception
Exceptionpublic void approximateReceiveCountAttributeIsRequested()
throws Exception
Exceptionpublic void consumerResumesPollingIfNoMessagesReturnedInOneInvocationOfReceiveMessage()
throws Exception
Exceptionpublic void addMessageWithPayloadContainingIllegalCharacters()
throws Exception
Exceptionpublic void addMessageFailsWithExceptionIfTenantContextNotPresent()
throws Exception
Exceptionpublic void addMessageFailsWithNullTenantId()
throws Exception
Exceptionpublic void addMessageFailsWithEmptyTenantId()
throws Exception
Exceptionpublic void consumerPoolCanRecoverFromOverLimitException()
throws Exception
Exceptionpublic void consumerPoolCanRecoverFromError()
throws Exception
Exceptionpublic void ensureWorkContextAvailableForMessageProcessing()
throws Exception
Exceptionpublic void ensureTenantIdIsSentByProducer()
throws Exception
Exceptionpublic void ensureMessageRunnerKeyIsSentByProducer()
throws Exception
Exceptionpublic void ensureTenantDataIdIsSentByProducer()
throws Exception
Exceptionpublic void ensurePayloadIsSentByProducer()
throws Exception
Exceptionpublic void dontProcessAndDeleteMessagesThatCantBeDeserialized()
throws Exception
Exceptionpublic void deleteMessageWithoutTenantId()
throws Exception
Exceptionpublic void doNotProcessInvalidMessageWithValidator()
throws Exception
Exceptionpublic void doProcessValidMessageWithValidator()
throws Exception
Exceptionpublic void deleteMessageWithoutMessageRunnerKey()
throws Exception
Exceptionpublic void dontProcessMessageWithoutMessageRunner()
throws Exception
Exceptionpublic void failFastIfMessageCantBeSerialized()
throws Exception
Exceptionpublic void ensureTenantContextEstablishedOnConsumer()
throws Exception
Exceptionpublic void messageNotProcessedOrDeletedIfTenantContextEstablishmentThrowsException()
throws Exception
Exceptionpublic void supportEarlyAcknowledgementOfMessage()
throws Exception
Exceptionpublic void failFastWhenAddingMessageWithNoRegisteredMessageRunner()
throws Exception
Exceptionpublic void messageRunnerResponsiveToCancellationViaShutdown()
throws Exception
Exceptionpublic void cancelAutoAcknowledgement()
throws Exception
Exceptionpublic void autoExtensionOfVisibilityTimeout()
throws Exception
Exceptionpublic void autoExtensionOfVisibilityTimeoutFailsBecauseMessageNoLongerInFlight()
throws Exception
Also, since the visibility timeout has expired, we expect another MessageRunner to start executing the message
We should log this incident appropriately and tune the scheduling buffer time to be big enough to make this very unlikely .
Exceptionpublic void autoExtensionOfVisibilityTimeoutCancelledOnMessageProcessingException()
throws Exception
ExceptionCopyright © 2017 Atlassian. All rights reserved.