public MessageTimeoutException noResponse(String input) { if ("TIMEOUT_TEST_THROW".equals(input)) { throw new MessageTimeoutException("No response received for " + input); } else { return new MessageTimeoutException("No response received for " + input); } }
reply = getMessageBuilderFactory().withPayload(e.getMessage()) .setHeader(org.springframework.integration.http.HttpHeaders.STATUS_CODE, evaluateHttpStatus(httpEntity)) reply = getMessageBuilderFactory().withPayload(e.getMessage()) .setHeader(org.springframework.integration.http.HttpHeaders.STATUS_CODE, HttpStatus.INTERNAL_SERVER_ERROR)
reply = getMessageBuilderFactory().withPayload(e.getMessage()) .setHeader(org.springframework.integration.http.HttpHeaders.STATUS_CODE, evaluateHttpStatus(httpEntity)) reply = getMessageBuilderFactory().withPayload(e.getMessage()) .setHeader(org.springframework.integration.http.HttpHeaders.STATUS_CODE, HttpStatus.INTERNAL_SERVER_ERROR)
private Collection<StepExecution> receiveReplies(PollableChannel currentReplyChannel) { @SuppressWarnings("unchecked") Message<Collection<StepExecution>> message = (Message<Collection<StepExecution>>) messagingGateway.receive(currentReplyChannel); if(message == null) { throw new MessageTimeoutException("Timeout occurred before all partitions returned"); } else if (logger.isDebugEnabled()) { logger.debug("Received replies: " + message); } return message.getPayload(); }
logger.debug("trying semaphore"); if (!this.semaphore.tryAcquire(this.requestTimeout, TimeUnit.MILLISECONDS)) { throw new MessageTimeoutException(requestMessage, "Timed out waiting for connection"); throw new MessageTimeoutException(requestMessage, "Timed out waiting for response");
error = new MessageTimeoutException((Message<?>) object, "No reply received within timeout"); error = new MessageTimeoutException("No reply received within timeout"); throw new MessageTimeoutException((Message<?>) object, "No reply received from error channel within timeout"); throw new MessageTimeoutException("No reply received from error channel within timeout");
throw new MessageTimeoutException(requestMessage, "failed to receive JMS response within timeout of: " + this.receiveTimeout + "ms");
if (reply == null && this.errorOnTimeout) { if (object instanceof Message) { error = new MessageTimeoutException((Message<?>) object, "No reply received within timeout"); } else { error = new MessageTimeoutException("No reply received within timeout"); } }
private void waitingSendResponse(CompletableFuture future, Message<?> message) throws InterruptedException, ExecutionException { Long sendTimeout = this.sendTimeoutExpression.getValue(this.evaluationContext, message, Long.class); if (sendTimeout < 0) { future.get(); } else { try { future.get(sendTimeout, TimeUnit.MILLISECONDS); if (log.isDebugEnabled()) { log.debug("{} sent successfully in sync mode", message); } } catch (TimeoutException e) { throw new MessageTimeoutException(message, "Timeout waiting for send event hub response", e); } } }
private void waitingSendResponse(CompletableFuture future, Message<?> message) throws InterruptedException, ExecutionException { Long sendTimeout = this.sendTimeoutExpression.getValue(this.evaluationContext, message, Long.class); if (sendTimeout < 0) { future.get(); } else { try { future.get(sendTimeout, TimeUnit.MILLISECONDS); if (log.isDebugEnabled()) { log.debug("{} sent successfully in sync mode", message); } } catch (TimeoutException e) { throw new MessageTimeoutException(message, "Timeout waiting for send event hub response", e); } } }
@Override protected void handleMessageInternal(Message<?> message) throws Exception { Future<?> resultFuture = handleMessageToAws(message); if (this.sync) { Long sendTimeout = this.sendTimeoutExpression.getValue(this.evaluationContext, message, Long.class); if (sendTimeout == null || sendTimeout < 0) { resultFuture.get(); } else { try { resultFuture.get(sendTimeout, TimeUnit.MILLISECONDS); } catch (TimeoutException te) { throw new MessageTimeoutException(message, "Timeout waiting for response from AmazonKinesis", te); } } } }
@Override protected void handleMessageInternal(Message<?> message) throws Exception { Future<?> resultFuture = handleMessageToAws(message); if (this.sync) { Long sendTimeout = this.sendTimeoutExpression.getValue(this.evaluationContext, message, Long.class); if (sendTimeout == null || sendTimeout < 0) { resultFuture.get(); } else { try { resultFuture.get(sendTimeout, TimeUnit.MILLISECONDS); } catch (TimeoutException te) { throw new MessageTimeoutException(message, "Timeout waiting for response from AmazonKinesis", te); } } } }
logger.debug("trying semaphore"); if (!this.semaphore.tryAcquire(this.requestTimeout, TimeUnit.MILLISECONDS)) { throw new MessageTimeoutException(requestMessage, "Timed out waiting for connection"); throw new MessageTimeoutException(requestMessage, "Timed out waiting for response");
throw new MessageTimeoutException(message, "Timeout waiting for response from KafkaProducer", te);
throw new MessageTimeoutException(message, "Timeout waiting for response from KafkaProducer", te);
error = new MessageTimeoutException((Message<?>) object, "No reply received within timeout"); error = new MessageTimeoutException("No reply received within timeout"); throw new MessageTimeoutException((Message<?>) object, "No reply received from error channel within timeout"); throw new MessageTimeoutException("No reply received from error channel within timeout");
throw new MessageTimeoutException(requestMessage, "failed to receive JMS response within timeout of: " + this.receiveTimeout + "ms");