You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Tristan Hill <tr...@saticed.me.uk> on 2016/04/07 13:34:04 UTC

feedback on proposed arn for aws-sqs implementation

Hi,
To simplify our application configuration I would like camel's aws-sqs 
component to accept an arn as well as the queue name is does currently. 
  Since the region and account number are also in the arn this would 
also help avoid needing the listqueues permissions as the queue url 
could be constructed similar to the current implementation when region 
and account id are passed through.

The format I am thinking of would be something like
aws-sqs://arn:aws:sqs:eu-west-1:account_no:queue_name[?options], so 
overloading the current queue name parameter.  The implementation could 
then assume a name starting with arn: is actually an arn, otherwise a 
queue name as before.  Would this seem like a reasonable potential 
modification?

Thanks
Tristan

Re: feedback on proposed arn for aws-sqs implementation

Posted by tristanh <tr...@saticed.me.uk>.
tristanh wrote
> With just the queue name currently it's
> 
> sqs:queue-name?amazonSQSClient=#sqsClient&attributeNames=#sqsAttributeNames&queueOwnerAWSAccountId=123456789&region=eu-west-1
> 
> equivalent using an arn would be:
> 
> sqs:arn:aws:sqs:eu-west-1:123456789:queue-name?amazonSQSClient=#sqsClient&attributeNames=#sqsAttributeNames

of course that should be

aws-sqs://queue-name?amazonSQSClient=#sqsClient&attributeNames=#sqsAttributeNames&queueOwnerAWSAccountId=123456789&region=eu-west-1

and

aws-sqs://arn:aws:sqs:eu-west-1:123456789:queue-name?amazonSQSClient=#sqsClient&attributeNames=#sqsAttributeNames

Tristan



--
View this message in context: http://camel.465427.n5.nabble.com/feedback-on-proposed-arn-for-aws-sqs-implementation-tp5780676p5780686.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: feedback on proposed arn for aws-sqs implementation

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Apr 7, 2016 at 2:51 PM, tristanh <tr...@saticed.me.uk> wrote:
> Claus Ibsen-2 wrote
>> Can you provide an example of the two uris with and withour arn. What
>> are the rules for an arn, is it just a text or does it use colons in
>> the text ?
>
> Yes the arn contains colons.
>
> With just the queue name currently it's
>
> sqs:queue-name?amazonSQSClient=#sqsClient&attributeNames=#sqsAttributeNames&queueOwnerAWSAccountId=123456789&region=eu-west-1
>
> equivalent using an arn would be:
>
> sqs:arn:aws:sqs:eu-west-1:123456789:queue-name?amazonSQSClient=#sqsClient&attributeNames=#sqsAttributeNames
>

Ah okay as longer there are no other options in the context-path, then
we should be okay with this syntax:

sqs:queueNameOrArn?options

You are welcome to work on a patch / PR with this and log a JIRA
http://camel.apache.org/contributing



> Tristan
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/feedback-on-proposed-arn-for-aws-sqs-implementation-tp5780676p5780685.html
> Sent from the Camel Development mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: feedback on proposed arn for aws-sqs implementation

Posted by tristanh <tr...@saticed.me.uk>.
Claus Ibsen-2 wrote
> Can you provide an example of the two uris with and withour arn. What
> are the rules for an arn, is it just a text or does it use colons in
> the text ?

Yes the arn contains colons.

With just the queue name currently it's

sqs:queue-name?amazonSQSClient=#sqsClient&attributeNames=#sqsAttributeNames&queueOwnerAWSAccountId=123456789&region=eu-west-1

equivalent using an arn would be:

sqs:arn:aws:sqs:eu-west-1:123456789:queue-name?amazonSQSClient=#sqsClient&attributeNames=#sqsAttributeNames

Tristan



--
View this message in context: http://camel.465427.n5.nabble.com/feedback-on-proposed-arn-for-aws-sqs-implementation-tp5780676p5780685.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: feedback on proposed arn for aws-sqs implementation

Posted by Claus Ibsen <cl...@gmail.com>.
Can you provide an example of the two uris with and withour arn. What
are the rules for an arn, is it just a text or does it use colons in
the text ?

The concern is how parsing the uri becomes more complicated in terms
of mapping that correct to the options.



On Thu, Apr 7, 2016 at 1:34 PM, Tristan Hill <tr...@saticed.me.uk> wrote:
> Hi,
> To simplify our application configuration I would like camel's aws-sqs
> component to accept an arn as well as the queue name is does currently.
> Since the region and account number are also in the arn this would also help
> avoid needing the listqueues permissions as the queue url could be
> constructed similar to the current implementation when region and account id
> are passed through.
>
> The format I am thinking of would be something like
> aws-sqs://arn:aws:sqs:eu-west-1:account_no:queue_name[?options], so
> overloading the current queue name parameter.  The implementation could then
> assume a name starting with arn: is actually an arn, otherwise a queue name
> as before.  Would this seem like a reasonable potential modification?
>
> Thanks
> Tristan



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2