camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Cosentino (JIRA)" <>
Subject [jira] [Commented] (CAMEL-10280) Don't require create privileges to publish to named SNS topic
Date Fri, 02 Sep 2016 08:51:22 GMT


Andrea Cosentino commented on CAMEL-10280:

We have 

        if (configuration.getTopicArn() == null) {
            // creates a new topic, or returns the URL of an existing one
            CreateTopicRequest request = new CreateTopicRequest(configuration.getTopicName());

            LOG.trace("Creating topic [{}] with request [{}]...", configuration.getTopicName(),

            CreateTopicResult result = snsClient.createTopic(request);

            LOG.trace("Topic created with Amazon resource name: {}", configuration.getTopicArn());

We can add a control before creating the topic and if we have an ARN, we can skip the creation.
What do you think about this approach?

> Don't require create privileges to publish to named SNS topic
> -------------------------------------------------------------
>                 Key: CAMEL-10280
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-aws
>    Affects Versions: 2.17.3, 2.18.0
>            Reporter: Stefan Fussenegger
>            Assignee: Andrea Cosentino
> If a topic already exists, the {{SnsEndpoint}} still requires privileges for the (idempotent)
{{CreateTopic}} operation to resolve the name to an ARN.
> In comparison, the {{SqsEndpoint}} uses the {{ListQueues}} operation to check for an
existing queue before trying to create a queue.
> Providing an ARN instead of a name bypasses the issue (added to 2.18 in CAMEL-9844).
Using an ARN instead of a name isn't always practical though.

This message was sent by Atlassian JIRA

View raw message