@Override protected MessageTimeoutException doBuild(final DittoHeaders dittoHeaders, @Nullable final String message, @Nullable final String description, @Nullable final Throwable cause, @Nullable final URI href) { return new MessageTimeoutException(dittoHeaders, message, description, cause, href); }
private void handleReceiveTimeout(final ReceiveTimeout receiveTimeout) { if (messageTimeout != null && !isFireAndForgetMessage) { logger.info("Got ReceiveTimeout when a message response was expected after timeout {}", messageTimeout); handleDittoRuntimeException(new MessageTimeoutException(messageTimeout.getSeconds())); } else { logger.warning("No response within server request timeout ({}), shutting actor down.", serverRequestTimeout); // note that we do not need to send a response here, this is handled by RequestTimeoutHandlingDirective stop(); } }