sent = future.get(timeout, TimeUnit.MILLISECONDS);
}
} catch (InterruptedException e) {
log.warn(e.getMessage(), e);
} catch (Exception e) {
throw new MessagingException(e.getMessage(), e);
} finally {
if (!sent && !future.isDone()) {
future.cancel(true);
}
}