fix:优化文档转换组件的消息队列
This commit is contained in:
@@ -20,6 +20,7 @@ import com.adc.da.util.http.ResponseMessage;
|
||||
import com.adc.da.util.http.Result;
|
||||
import com.adc.da.util.utils.StringUtils;
|
||||
import com.adc.da.util.utils.UUID;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -40,7 +41,7 @@ import java.util.Map;
|
||||
@Component
|
||||
public class SendConvertMQService {
|
||||
|
||||
// 文档转换远程服务IP地址s
|
||||
// 文档转换远程服务IP地址
|
||||
@Value("${convert.host}")
|
||||
private String convertHost;
|
||||
|
||||
@@ -74,9 +75,11 @@ public class SendConvertMQService {
|
||||
value = @Queue(value = "createConvertStandMQ_SQ_GSAR_RELEASE", durable = "true"),
|
||||
exchange = @Exchange(value = "convert-exchange_SQ_GSAR_RELEASE", ignoreDeclarationExceptions = "true"),
|
||||
key = "convert-key_SQ_GSAR_RELEASE"))
|
||||
public void createMQ(Map<String,Object> convertInfo, Message message, Channel channel) throws Exception{
|
||||
public void createMQ(Message message, Channel channel) throws Exception{
|
||||
try{
|
||||
try{
|
||||
String messagePayload = (String) message.getPayload();
|
||||
Map<String,Object> convertInfo = JSONObject.parseObject(messagePayload, Map.class);
|
||||
Thread.sleep(5000);
|
||||
insertConvertMsg(convertInfo);
|
||||
}catch(InterruptedException e){
|
||||
|
||||
Reference in New Issue
Block a user