Example #1
0
        /// <summary>
        /// Internal use only.
        /// The queue names generated by the acceptance test suite are often longer than the SQS maximum of
        /// 80 characters. This setting allows queue names to be pretruncated so the tests can work.
        /// The "pre-truncation" mechanism removes characters from the first character *after* the queue name prefix.
        /// For example, if the queue name prefix is "AcceptanceTest-", and the queue name is "abcdefg", and we need
        /// to have a queue name of no more than 20 characters for the sake of the example, the pre-truncated queue
        /// name would be "AcceptanceTest-cdefg".
        /// This gives us the ability to locate all queues by the given prefix, and we do not interfere with the
        /// discriminator or qualifier at the end of the queue name.
        /// </summary>
        internal static TransportExtensions <SqsTransport> PreTruncateQueueNamesForAcceptanceTests(this TransportExtensions <SqsTransport> transportExtensions, bool use = true)
        {
            transportExtensions.GetSettings().Set(SettingsKeys.PreTruncateQueueNames, use);

            return(transportExtensions);
        }
Example #2
0
        /// <summary>
        /// Configures the SQS transport to use SQS message delays for deferring messages.
        /// The maximum deferral time permitted by SQS is 15 minutes.
        /// If not specified, the default is to use a TimeoutManager based deferral.
        /// </summary>
        /// <param name="transportExtensions"></param>
        /// <param name="use">Set to true to use SQS message delays for deferring messages; false otherwise.</param>
        public static TransportExtensions <SqsTransport> NativeDeferral(this TransportExtensions <SqsTransport> transportExtensions, bool use = true)
        {
            transportExtensions.GetSettings().Set(SettingsKeys.NativeDeferral, use);

            return(transportExtensions);
        }
Example #3
0
        /// <summary>
        /// Specifies a string value that will be prepended to the name of every SQS queue
        /// referenced by the endpoint. This is useful when deploying many environments of the
        /// same application in the same AWS region (say, a development environment, a QA environment
        /// and a production environment), and you need to differentiate the queue names per environment.
        /// </summary>
        public static TransportExtensions <SqsTransport> QueueNamePrefix(this TransportExtensions <SqsTransport> transportExtensions, string queueNamePrefix)
        {
            transportExtensions.GetSettings().Set(SettingsKeys.QueueNamePrefix, queueNamePrefix);

            return(transportExtensions);
        }
Example #4
0
        /// <summary>
        /// This tells the endpoint where to look for AWS credentials.
        /// If not specified, the endpoint defaults to EnvironmentVariables.
        /// </summary>
        public static TransportExtensions <SqsTransport> CredentialSource(this TransportExtensions <SqsTransport> transportExtensions, SqsCredentialSource credentialSource)
        {
            transportExtensions.GetSettings().Set(SettingsKeys.CredentialSource, credentialSource);

            return(transportExtensions);
        }
 public static TransportExtensions <GooglePubSubTransport> Project(this TransportExtensions <GooglePubSubTransport> transportExtensions, string projectId)
 {
     transportExtensions.GetSettings().Set(SettingsKeys.ProjectId, projectId);
     return(transportExtensions);
 }