Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5782

regression : invalid SetQueueAttributesRequest created, works on 2.10.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9.4, 2.10.2
    • 2.9.5, 2.10.3, 2.11.0
    • camel-aws
    • None
    • Unknown

    Description

      In org.apache.camel.component.aws.sqs.SqsEndpoint.updateQueueAttributes,
      if I don't have any configuration, the created SetQueueAttributesRequest contains a null atttribute collection and AWS emit an error.

      In 2.10.1, no problem.

      Workaround in 2.10.2 : force the create SetQueueAttributesRequest to contain a valid attribute collection by defining a configuration in camel.

      For exemple:
      from("aws-sqs://"queue"?amazonSQSClient=#amazonSQSClient&delay="pollCycle.getMillis()"&maxMessagesPerPoll=10&deleteAfterRead=false")

      -> works on 2.10.1, fail on 2.10.2

      if I add an argument to my URI"&defaultVisibilityTimeout=30"
      -> works on 2.10.1, works on 2.10.2

      Exception :

      {{
      Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route SQS-to-MongoDB-EVENTS: Route[[From[aws-sqs://EVENTS?amazonSQSClient=#amazonSQSClien... because of Failed to resolve endpoint: aws-sqs://EVENTS?amazonSQSClient=%23amazonSQSClient&delay=60000&deleteAfterRead=false&maxMessagesPerPoll=10 due to: The request must contain the parameter Attribute.Name.
      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:722) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1789) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1575) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412) ~[camel-core-2.10.2.jar:2.10.2]
      at com.netceler.iv5measure.contract.impl.sqs.CamelRoutesLauncher.start(CamelRoutesLauncher.java:55) ~[webapp-0.1.2-SNAPSHOT.jar:0.1.2-SNAPSHOT]
      at com.netceler.iv5measure.contract.impl.config.ConfiguredStreamInitializer.startStreams(ConfiguredStreamInitializer.java:39) ~[webapp-0.1.2-SNAPSHOT.jar:0.1.2-SNAPSHOT]
      ... 58 common frames omitted
      Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: aws-sqs://EVENTS?amazonSQSClient=%23amazonSQSClient&delay=60000&deleteAfterRead=false&maxMessagesPerPoll=10 due to: The request must contain the parameter Attribute.Name.
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:479) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:50) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:186) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:114) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:90) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:851) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:171) ~[camel-core-2.10.2.jar:2.10.2]
      ... 66 common frames omitted
      Caused by: com.amazonaws.AmazonServiceException: The request must contain the parameter Attribute.Name.
      at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:614) ~[aws-java-sdk-1.3.23.jar:na]
      at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:312) ~[aws-java-sdk-1.3.23.jar:na]
      at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:165) ~[aws-java-sdk-1.3.23.jar:na]
      at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:812) ~[aws-java-sdk-1.3.23.jar:na]
      at com.amazonaws.services.sqs.AmazonSQSClient.setQueueAttributes(AmazonSQSClient.java:246) ~[aws-java-sdk-1.3.23.jar:na]
      at com.netceler.infra.aws.sqs.JMXSQS.setQueueAttributes(JMXSQS.java:108) ~[infra-sqs-0.0.3-SNAPSHOT.jar:0.0.3-SNAPSHOT]
      at com.netceler.infra.aws.sqs.AmazonSQSClientProxy.setQueueAttributes(AmazonSQSClientProxy.java:63) ~[infra-sqs-0.0.3-SNAPSHOT.jar:0.0.3-SNAPSHOT]
      at org.apache.camel.component.aws.sqs.SqsEndpoint.updateQueueAttributes(SqsEndpoint.java:139) ~[camel-aws-2.10.2.jar:2.10.2]
      at org.apache.camel.component.aws.sqs.SqsEndpoint.doStart(SqsEndpoint.java:93) ~[camel-aws-2.10.2.jar:2.10.2]
      at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:931) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:892) ~[camel-core-2.10.2.jar:2.10.2]
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:475) ~[camel-core-2.10.2.jar:2.10.2]
      ... 74 common frames omitted
      }}

      Attachments

        Activity

          People

            muellerc Christian Müller
            jgraglia Julien Graglia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: