You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i'm experiencing an issue while trying to send a lot of messages from same jar, once in a while, timeout occurs, and message fails.
using library 1.0.8
java 8
ubuntu VM
this is the code:
try {
initConnection();
LOG.debug(() -> ":sendMessage: opening connection");
SQSConnection connection = connectionFactoryProd.createConnection();
AmazonSQSMessagingClientWrapper client = connection.getWrappedAmazonSQSClient();
if (!client.queueExists(queueName)) {
client.createQueue(queueName);
}
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Queue queue = session.createQueue(queueName);
TextMessage textMessage = session.createTextMessage(message);
LOG.debug(() -> ":sendMessage: creating producer for queue:" + queueName);
MessageProducer producer = session.createProducer(queue);
LOG.debug(() -> ":sendMessage: sending message");
producer.send(textMessage);
LOG.debug(() -> ":sendMessage: closing connection");
connection.close();
} catch (JMSException e) {
throw new DatasourceException("unable to process message", e);
} catch (Exception e) {
throw new DatasourceException("internal error", e);
}
}
**and this is the error message:**
at com.amazon.sqs.javamessaging.SQSMessageProducer.send(SQSMessageProducer.java:359) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.queue.sqs.producer.SQSWriter.sendMessage(SQSWriter.java:30) ~[exclusionsscheduler-2.01.24-520.jar:?]
... 8 more
16:56:08.095 [pool-3-thread-38] ERROR com.queue.sqs.producer.SQSMessageSender - SQSMessageSender:run: failed to init AMQ sender. time it took 791833 Thread[pool-3-thread-38,5,main] time: 1595609768095
com.tools.exceptions.DatasourceException: unable to process message
at com.queue.sqs.producer.SQSWriter.sendMessage(SQSWriter.java:34) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.queue.sqs.producer.SQSMessageSender.run(SQSMessageSender.java:34) [exclusionsscheduler-2.01.24-520.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_252]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_252]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_252]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: javax.jms.JMSException: AmazonClientException: getQueueUrl.
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.handleException(AmazonSQSMessagingClientWrapper.java:436) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.getQueueUrl(AmazonSQSMessagingClientWrapper.java:296) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.getQueueUrl(AmazonSQSMessagingClientWrapper.java:265) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazon.sqs.javamessaging.SQSSession.createQueue(SQSSession.java:636) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.queue.sqs.producer.SQSWriter.sendMessage(SQSWriter.java:25) ~[exclusionsscheduler-2.01.24-520.jar:?]
... 8 more
Caused by: com.amazonaws.AbortedException:
at com.amazonaws.internal.SdkFilterInputStream.abortIfNeeded(SdkFilterInputStream.java:51) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.internal.SdkFilterInputStream.read(SdkFilterInputStream.java:65) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.event.ProgressInputStream.read(ProgressInputStream.java:158) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:2890) ~[?:1.8.0_252]
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:674) ~[?:1.8.0_252]
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1304) ~[?:1.8.0_252]
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:1255) ~[?:1.8.0_252]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:253) ~[?:1.8.0_252]
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.setInputSource(XMLStreamReaderImpl.java:199) ~[?:1.8.0_252]
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.<init>(XMLStreamReaderImpl.java:184) ~[?:1.8.0_252]
at com.sun.xml.internal.stream.XMLInputFactoryImpl.getXMLStreamReaderImpl(XMLInputFactoryImpl.java:277) ~[?:1.8.0_252]
at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:129) ~[?:1.8.0_252]
at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLEventReader(XMLInputFactoryImpl.java:78) ~[?:1.8.0_252]
at com.amazonaws.http.StaxResponseHandler.handle(StaxResponseHandler.java:92) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.StaxResponseHandler.handle(StaxResponseHandler.java:44) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.response.AwsResponseHandlerAdapter.handle(AwsResponseHandlerAdapter.java:70) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleResponse(AmazonHttpClient.java:1503) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1226) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1030) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:742) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:716) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.services.sqs.AmazonSQSClient.doInvoke(AmazonSQSClient.java:1792) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:1768) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.services.sqs.AmazonSQSClient.executeGetQueueUrl(AmazonSQSClient.java:1069) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazonaws.services.sqs.AmazonSQSClient.getQueueUrl(AmazonSQSClient.java:1046) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.getQueueUrl(AmazonSQSMessagingClientWrapper.java:294) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.getQueueUrl(AmazonSQSMessagingClientWrapper.java:265) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.amazon.sqs.javamessaging.SQSSession.createQueue(SQSSession.java:636) ~[exclusionsscheduler-2.01.24-520.jar:?]
at com.queue.sqs.producer.SQSWriter.sendMessage(SQSWriter.java:25) ~[exclusionsscheduler-2.01.24-520.jar:?]
... 8 more
`
The text was updated successfully, but these errors were encountered:
Hi,
i'm experiencing an issue while trying to send a lot of messages from same jar, once in a while, timeout occurs, and message fails.
using library 1.0.8
java 8
ubuntu VM
this is the code:
The text was updated successfully, but these errors were encountered: