Commit 53636947 authored by yanzg's avatar yanzg

合并空行BUG

parent dbd13e20
...@@ -5,11 +5,8 @@ import com.yanzuoguang.mq.vo.MessageVo; ...@@ -5,11 +5,8 @@ import com.yanzuoguang.mq.vo.MessageVo;
import com.yanzuoguang.util.helper.StringHelper; import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.log.Log; import com.yanzuoguang.util.log.Log;
import org.springframework.amqp.core.Message; import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
import org.springframework.amqp.rabbit.support.CorrelationData; import org.springframework.amqp.rabbit.support.CorrelationData;
import org.springframework.beans.factory.annotation.Configurable; import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
...@@ -20,6 +17,7 @@ import java.nio.charset.Charset; ...@@ -20,6 +17,7 @@ import java.nio.charset.Charset;
/** /**
* MQ队列相关配置信息 * MQ队列相关配置信息
*
* @author 颜佐光 * @author 颜佐光
*/ */
@Configurable @Configurable
...@@ -67,10 +65,10 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem ...@@ -67,10 +65,10 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
String toId = getId(correlationData.getId()); String toId = getId(correlationData.getId());
// 不是临时数据 // 不是临时数据
if (toId.equals(correlationData.getId())) { if (toId.equals(correlationData.getId())) {
messageService.onSuccess(getId(correlationData.getId())); messageService.onSuccess(toId);
} }
} else if (!ack) { } else if (!ack) {
System.out.println("丢失消息:" + ack); System.out.println("丢失消息:" + ack + " msg:" + cause);
} }
} catch (Exception ex) { } catch (Exception ex) {
Log.error(MqConfigurable.class, ex); Log.error(MqConfigurable.class, ex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment