1
|
package com.yoho.search.consumer.index.increment.productIndex;
|
1
|
package com.yoho.search.consumer.index.increment.productIndex;
|
2
|
|
2
|
|
|
|
3
|
+import java.util.ArrayList;
|
|
|
4
|
+import java.util.HashMap;
|
|
|
5
|
+import java.util.List;
|
|
|
6
|
+import java.util.Map;
|
|
|
7
|
+
|
|
|
8
|
+import org.apache.commons.collections.CollectionUtils;
|
|
|
9
|
+import org.apache.commons.lang.StringUtils;
|
|
|
10
|
+import org.slf4j.Logger;
|
|
|
11
|
+import org.slf4j.LoggerFactory;
|
|
|
12
|
+import org.springframework.amqp.core.Message;
|
|
|
13
|
+import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
|
|
|
14
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
15
|
+import org.springframework.stereotype.Component;
|
|
|
16
|
+
|
3
|
import com.rabbitmq.client.Channel;
|
17
|
import com.rabbitmq.client.Channel;
|
4
|
import com.yoho.search.base.utils.ConvertUtils;
|
18
|
import com.yoho.search.base.utils.ConvertUtils;
|
5
|
import com.yoho.search.base.utils.EventReportEnum;
|
19
|
import com.yoho.search.base.utils.EventReportEnum;
|
|
@@ -11,19 +25,6 @@ import com.yoho.search.consumer.service.logic.productIndex.StorageUpdateTimeLogi |
|
@@ -11,19 +25,6 @@ import com.yoho.search.consumer.service.logic.productIndex.StorageUpdateTimeLogi |
11
|
import com.yoho.search.dal.model.Product;
|
25
|
import com.yoho.search.dal.model.Product;
|
12
|
import com.yoho.search.dal.model.Storage;
|
26
|
import com.yoho.search.dal.model.Storage;
|
13
|
import com.yoho.search.dal.model.StorageUpdateTime;
|
27
|
import com.yoho.search.dal.model.StorageUpdateTime;
|
14
|
-import org.apache.commons.collections.CollectionUtils;
|
|
|
15
|
-import org.apache.commons.lang.StringUtils;
|
|
|
16
|
-import org.slf4j.Logger;
|
|
|
17
|
-import org.slf4j.LoggerFactory;
|
|
|
18
|
-import org.springframework.amqp.core.Message;
|
|
|
19
|
-import org.springframework.amqp.rabbit.core.ChannelAwareMessageListener;
|
|
|
20
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
21
|
-import org.springframework.stereotype.Component;
|
|
|
22
|
-
|
|
|
23
|
-import java.util.ArrayList;
|
|
|
24
|
-import java.util.HashMap;
|
|
|
25
|
-import java.util.List;
|
|
|
26
|
-import java.util.Map;
|
|
|
27
|
|
28
|
|
28
|
@Component
|
29
|
@Component
|
29
|
public class StorageMqListener extends AbstractStorageRelatedMqListener implements ChannelAwareMessageListener {
|
30
|
public class StorageMqListener extends AbstractStorageRelatedMqListener implements ChannelAwareMessageListener {
|
|
@@ -44,7 +45,7 @@ public class StorageMqListener extends AbstractStorageRelatedMqListener implemen |
|
@@ -44,7 +45,7 @@ public class StorageMqListener extends AbstractStorageRelatedMqListener implemen |
44
|
@Override
|
45
|
@Override
|
45
|
public void onMessage(Message message, Channel channel) throws Exception {
|
46
|
public void onMessage(Message message, Channel channel) throws Exception {
|
46
|
try {
|
47
|
try {
|
47
|
- process(this, message);
|
48
|
+ //process(this, message);
|
48
|
} catch (Exception e) {
|
49
|
} catch (Exception e) {
|
49
|
publisher.publishEvent(buildSearchEvent(EventReportEnum.STORAGEMQLISTENER_ONMESSAGE,e));
|
50
|
publisher.publishEvent(buildSearchEvent(EventReportEnum.STORAGEMQLISTENER_ONMESSAGE,e));
|
50
|
Thread.sleep(1000);
|
51
|
Thread.sleep(1000);
|