diff --git a/v1/factories.go b/v1/factories.go index 907cf56e..2e1c0965 100644 --- a/v1/factories.go +++ b/v1/factories.go @@ -94,6 +94,12 @@ func BrokerFactory(cnf *config.Config) (brokeriface.Broker, error) { if strings.HasPrefix(cnf.Broker, "https://sqs") { return sqsbroker.New(cnf), nil } + + const sqsPrefix = "sqs+" + if strings.HasPrefix(cnf.Broker, sqsPrefix) { + cnf.Broker = strings.TrimPrefix(cnf.Broker, sqsPrefix) + return sqsbroker.New(cnf), nil + } } if strings.HasPrefix(cnf.Broker, "gcppubsub://") { @@ -179,6 +185,12 @@ func BackendFactory(cnf *config.Config) (backendiface.Backend, error) { return dynamobackend.New(cnf), nil } + const dynamodbPrefix = "dynamodb+" + if strings.HasPrefix(cnf.ResultBackend, dynamodbPrefix) { + cnf.ResultBackend = strings.TrimPrefix(cnf.ResultBackend, dynamodbPrefix) + return dynamobackend.New(cnf), nil + } + return nil, fmt.Errorf("Factory failed with result backend: %v", cnf.ResultBackend) }