{
ensurePayloadSerializable(event);
}
catch (final Exception e)
{
throw new MessagingException(
MessageFactory.createStaticMessage("Failed to prepare message for processing"), event, e, getUntilSuccessfulConfiguration().getRouter());
}
try
{
final Serializable eventStoreKey = storeEvent(event);
scheduleForProcessing(eventStoreKey, true);
if (getUntilSuccessfulConfiguration().getAckExpression() == null)
{
return VoidMuleEvent.getInstance();
}
return processResponseThroughAckResponseExpression(event);
}
catch (final Exception e)
{
throw new MessagingException(
MessageFactory.createStaticMessage("Failed to schedule the event for processing"), event, e,
getUntilSuccessfulConfiguration().getRouter());
}
}