14

के लिए मौजूद नहीं है मैं ऑटो कॉन्फ़िगरेशन का उपयोग कर संदेश के साथ वसंत क्लाउड को काम करने का प्रयास कर रहा हूं।वसंत बादल - एसक्यूएस - निर्दिष्ट कतार इस wsdl संस्करण

मेरे गुण फ़ाइल है:

cloud.aws.credentials.accessKey=xxxxxxxxxx 
cloud.aws.credentials.secretKey=xxxxxxxxxx 

cloud.aws.region.static=us-west-2 

मेरे विन्यास वर्ग इस प्रकार है:

@EnableSqs 
@ComponentScan 
@EnableAutoConfiguration 
public class Application { 


public static void main(String[] args) throws Exception { 
    SpringApplication.run(Application.class, args); 
    } 
} 

मेरे श्रोता वर्ग:

@RestController सार्वजनिक वर्ग OrderListener {

@MessageMapping("orderQueue") 
public void orderListener(Order order){ 

    System.out.println("Order Name " + order.getName()); 
    System.out.println("Order Url" + order.getUrl()); 

    } 

} 

हालांकि, जब मैं इसे चलाता हूं। मुझे निम्न त्रुटि मिलती है:

org.springframework.context.ApplicationContextException: Failed to start bean  'simpleMessageListenerContainer'; nested exception is  org.springframework.messaging.core.DestinationResolutionException: The specified queue does not exist for this wsdl version. (Service: AmazonSQS; Status Code: 400; Error Code: AWS.SimpleQueueService.NonExistentQueue; Request ID: cc8cb199-be88-5993-bd58-fca3c9f17110); nested exception is com.amazonaws.services.sqs.model.QueueDoesNotExistException: The specified queue does not exist for this wsdl version. (Service: AmazonSQS; Status Code: 400; Error Code: AWS.SimpleQueueService.NonExistentQueue; Request ID: cc8cb199-be88-5993-bd58-fca3c9f17110) 
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:176) 
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51) 
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346) 
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) 
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) 
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:770) 
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:140) 
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483) 
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) 
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) 
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) 
at org.springframework.boot.SpringApplication.run(SpringApplication.java:961) 
at org.springframework.boot.SpringApplication.run(SpringApplication.java:950) 
at com.releasebot.processor.Application.main(Application.java:40) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:483) 
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) 

Caused by: org.springframework.messaging.core.DestinationResolutionException: The specified queue does not exist for this wsdl version. (Service: AmazonSQS; Status Code: 400; Error Code: AWS.SimpleQueueService.NonExistentQueue; Request ID: cc8cb199-be88-5993-bd58-fca3c9f17110); nested exception is com.amazonaws.services.sqs.model.QueueDoesNotExistException: The specified queue does not exist for this wsdl version. (Service: AmazonSQS; Status Code: 400; Error Code: AWS.SimpleQueueService.NonExistentQueue; Request ID: cc8cb199-be88-5993-bd58-fca3c9f17110) 
at org.springframework.cloud.aws.messaging.support.destination.DynamicQueueUrlDestinationResolver.resolveDestination(DynamicQueueUrlDestinationResolver.java:81) 
at org.springframework.cloud.aws.messaging.support.destination.DynamicQueueUrlDestinationResolver.resolveDestination(DynamicQueueUrlDestinationResolver.java:37) 
at org.springframework.messaging.core.CachingDestinationResolverProxy.resolveDestination(CachingDestinationResolverProxy.java:88) 
at org.springframework.cloud.aws.messaging.listener.AbstractMessageListenerContainer.start(AbstractMessageListenerContainer.java:300) 
at org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer.start(SimpleMessageListenerContainer.java:38) 
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173) 
... 18 common frames omitted 

कोई और इस पर दौड़ता है? किसी भी मदद की बहुत

उत्तर

10

यह त्रुटि की सराहना की जाएगी मतलब है कि निर्दिष्ट कतार orderQueue क्षेत्र हमें पश्चिम -2 पर मौजूद नहीं है। बस इसे बनाएं और इसे काम करना चाहिए।

Btw, वहाँ जब @EnableAutoConfiguration का उपयोग कर @EnableSqs जोड़ने की आवश्यकता नहीं है।

+0

तो मैं सत्यापित है कि कतार क्षेत्र में अभी भी था हमें पश्चिम -2 और त्रुटि अभी भी वहाँ था। जब मैंने @EnableSqs को हटा दिया तो त्रुटि दूर हो गई, हालांकि यह कतार से कनेक्ट नहीं हुआ। – polomarco

4

नाम के बजाए कतार के यूआरएल का उपयोग करने का प्रयास करें।

+0

यह मेरे लिए मामला था, सिवाय इसके कि मैं QueuePolicy में यूआरएल के बजाय एआरएन का संदर्भ दे रहा था। – Sector95

1

कमांड लाइन का उपयोग करते हुए get-queue-url पर प्रयास करते समय मैंने एक ही समस्या को प्रभावित किया है। देखो मैं क्या था:

A client error (AWS.SimpleQueueService.NonExistentQueue) occurred when calling the GetQueueUrl operation: The specified queue does not exist for this wsdl version. 

इस चलाने के लिए था:

$aws configure 

और शीघ्र तहत 'डिफ़ॉल्ट क्षेत्र का नाम [...]:' क्षेत्र की तुलना में मेरी कतार के अंतर्गत आता है में प्रवेश किया। फिर त्रुटि गायब हो गई।

तो डबल अपने कॉन्फ़िगरेशन की जाँच;)

4

एलेन के जवाब सही है। यह त्रुटि इंगित करती है कि कतार हमारे क्षेत्र-पश्चिम -2 में मौजूद नहीं है। कारणों में से एक यह हो सकता है कि एडब्ल्यूएस जावा एसडीके हमें-पूर्व -1 को डिफ़ॉल्ट क्षेत्र के रूप में उपयोग करता है। एडब्ल्यूएस प्रलेखन

से http://docs.aws.amazon.com/java-sdk/latest/developer-guide/java-dg-region-selection.html

The AWS SDK for Java uses us-east-1 as the default region if you do not specify a region in your code. However, the AWS Management Console uses us-west-2 as its default. Therefore, when using the AWS Management Console in conjunction with your development, be sure to specify the same region in both your code and the console.

आप ग्राहक AmazonSQSClient वस्तु की setRegion() या setEndpoint() तरीकों का उपयोग कर में विशेष रूप से क्षेत्र या अंतिम बिंदु भी सेट कर सकते हैं। क्षेत्र की सूची के लिए http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/sqs/AmazonSQS.html#setEndpoint-java.lang.String-

देखें और अंतिम बिंदुओं को देखने http://docs.aws.amazon.com/general/latest/gr/rande.html#sqs_region

संबंधित मुद्दे