|
|
@ -1,6 +1,5 @@
|
|
|
|
package com.foreverwin.mesnac.anomaly.util;
|
|
|
|
package com.foreverwin.mesnac.anomaly.util;
|
|
|
|
|
|
|
|
|
|
|
|
import com.foreverwin.modular.core.exception.BaseException;
|
|
|
|
|
|
|
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
|
|
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
|
|
|
import org.json.JSONObject;
|
|
|
|
import org.json.JSONObject;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@ -42,7 +41,7 @@ public class ActiveMQUtil {
|
|
|
|
TextMessage textMessage = session.createTextMessage(sendMessage);
|
|
|
|
TextMessage textMessage = session.createTextMessage(sendMessage);
|
|
|
|
producer.send(textMessage);
|
|
|
|
producer.send(textMessage);
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
|
throw new BaseException("发送消息失败"+e.getMessage());
|
|
|
|
// throw new BaseException("发送消息失败"+e.getMessage());
|
|
|
|
}finally {
|
|
|
|
}finally {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (producer != null) {
|
|
|
|
if (producer != null) {
|
|
|
|