When a Deployer Receiver receives a transport package, it notifies the Deployer Workers there is 'work' for them to do. This notification can take the form of JMS messages sent using some kinds of queuing mechanism. This post describes the Amazon Simple Queuing Service (SQS) to send these notifications. The Deployer workers receive these messages from SQS and they start deploying/undeploying the package.
In order to setup this notification system, we must first create the SQS queues and configure them across the Deployer Receiver and all Deployer Workers.
Start by creating Standard Queues using all default properties. We need 3 queues (commit, content, and prepare):
Once the SQS queues are in place, we can configure the Deployers to use them in the file deployer-config.xml. Amazon gives us the queues URLs. We need to specify the URL base separately, and then simply name the queues individually, as per below:
The properties Username and Password represent the AWS account credentials and they can be found in AWS user security settings.
The property Workers specifies the number of worker threads for each queue. Values that perform best are around 10-20 worker threads. Performance degrades using lower values and there isn't any significant performance gain when using higher values.
In order to setup this notification system, we must first create the SQS queues and configure them across the Deployer Receiver and all Deployer Workers.
Start by creating Standard Queues using all default properties. We need 3 queues (commit, content, and prepare):
Once the SQS queues are in place, we can configure the Deployers to use them in the file deployer-config.xml. Amazon gives us the queues URLs. We need to specify the URL base separately, and then simply name the queues individually, as per below:
<Queues> <Queue Default="true" Verbs="Content" Adapter="JMS" Id="mihai-content"> <Property Name="Workers" Value="16"/> </Queue> <Queue Verbs="Commit,Rollback" Adapter="JMS" Id="mihai-commit"> <Property Name="Workers" Value="16"/> </Queue> <Queue Verbs="Prepare" Adapter="JMS" Id="mihai-prepare"> <Property Name="Workers" Value="16"/> </Queue> <Adapter Id="JMS"> <Property Name="JMSConnectionFactoryBuilderClass" Value="com.sdl.delivery.spring.configuration.jms.AmazonSQSConnectionFactoryBuilder"/> <Property Name="JMSUri" Value="https://sqs.eu-west-1.amazonaws.com/692321"/> <Property Name="Username" Value="username"/> <Property Name="Password" Value="password"/> <Property Name="ReceiveTimeout" Value="200"/> </Adapter> </Queues>
The properties Username and Password represent the AWS account credentials and they can be found in AWS user security settings.
The property Workers specifies the number of worker threads for each queue. Values that perform best are around 10-20 worker threads. Performance degrades using lower values and there isn't any significant performance gain when using higher values.
Comments