	private Message prepareForSending(BrokerMessage brkMessage, String messageSource)
	{
		try
		{
			final Message message = new Message();
			if (StringUtils.isNotBlank(brkMessage.messageId))
				message.setMessageId(brkMessage.messageId);
			if (StringUtils.isNotBlank(brkMessage.correlationId))
				message.setCorrelationId(brkMessage.correlationId);
			if (StringUtils.isNotBlank(brkMessage.destinationName))
				message.setDestination(brkMessage.destinationName);
			if (StringUtils.isNotBlank(brkMessage.timestamp))
			{
				message.setTimestamp(DateUtil.parseISODate(brkMessage.timestamp).getTime());
			}
			if (StringUtils.isNotBlank(brkMessage.expiration))
			{
				message.setExpiration(DateUtil.parseISODate(brkMessage.expiration).getTime());
			}
			message.setContent(brkMessage.textPayload);
			message.setSourceApp(messageSource);
			if (log.isDebugEnabled())
			{
				log.debug("Received message: {}", message.getMessageId());
			}
			return message;
		}
		catch (Throwable e)
		{
			throw new RuntimeException(e);
		}
	}

	private Message prepareForSending(BrokerMessage brkMessage, String messageSource)
	{
		try
		{
			final Message message = new Message();
			if (StringUtils.isNotBlank(brkMessage.messageId))
				message.setMessageId(brkMessage.messageId);
			if (StringUtils.isNotBlank(brkMessage.correlationId))
				message.setCorrelationId(brkMessage.correlationId);
			if (StringUtils.isNotBlank(brkMessage.destinationName))
				message.setDestination(brkMessage.destinationName);
			if (StringUtils.isNotBlank(brkMessage.timestamp))
			{
				message.setTimestamp(DateUtil.parseISODate(brkMessage.timestamp).getTime());
			}
			if (StringUtils.isNotBlank(brkMessage.expiration))
			{
				message.setExpiration(DateUtil.parseISODate(brkMessage.expiration).getTime());
			}
			message.setContent(brkMessage.textPayload);
			message.setSourceApp(messageSource);
			message.setPriority(brkMessage.priority);
			if (log.isDebugEnabled())
			{
				log.debug("Received message: {}", message.getMessageId());
			}
			return message;
		}
		catch (Throwable e)
		{
			throw new RuntimeException(e);
		}
	}
