|
@@ -42,15 +42,15 @@ class EtlServerApplicationTests {
|
|
|
@Test
|
|
|
void produceMsgTest() {
|
|
|
MQClient mqClient = new MQClient(httpEndpoint, accessKey, secretKey);
|
|
|
- MQProducer producer = mqClient.getProducer(instanceId, "topic_crawler_etl_dev");
|
|
|
+ MQProducer producer = mqClient.getProducer(instanceId, "topic_crawler_etl_test");
|
|
|
ArrayList<String> platforms = Lists.newArrayList("benshanzhufu", "kuaishou", "douyin", "xigua", "gongzhonghao", "xiaoniangao");
|
|
|
|
|
|
IntStream.range(0, 20).forEach(x -> {
|
|
|
try {
|
|
|
String s = "{\"user_id\": 6281907,\"out_user_id\": \"53322270\",\"platform\": \"" + platforms.get(x % 6) + "\",\"strategy\": \"author\"," +
|
|
|
"\"out_video_id\": \"" + System.currentTimeMillis() + "\"," +
|
|
|
- "\"video_title\": \"" + x + "人最佳喧,睡眠时间⚡\",\"cover_url\": \"https://cdn-xphoto2.xiaoniangao.cn/5071472172@690w_385h_0e_1pr%7C690x385-5rc_0r.jpg?OSSAccessKeyId=LTAI4G2W1FsgwzAWYpPoB3v6&Expires=1688140805&Signature=BC%2F9U%2BTjPGVwaqTpStSO1kdYhQU%3D\"," +
|
|
|
- "\"video_url\": \"https://cdn-xalbum2.xiaoniangao.cn/64858d720000014567e794c9?Expires=1704038400&OSSAccessKeyId=LTAI5tB7cRkYiqHcTdkVprwb&Signature=j0WjPwp6wq1XnstwpXL6z7f9wRM%3D\"" +
|
|
|
+ "\"video_title\": \"" + x + "世界上最强百米对决\",\"cover_url\": \"https://cdn-xphoto2.xiaoniangao.cn/5200474225?Expires=1704038400&OSSAccessKeyId=LTAI4G2W1FsgwzAWYpPoB3v6&Signature=ncvtSP8FSrwuU8unZMtxdXIuWBE%3D&x-oss-process=image%2Fresize%2Cw_690%2Ch_385%2Climit_0%2Finterlace%2C1%2Fformat%2Cjpg%2Fauto-orient%2C0\"," +
|
|
|
+ "\"video_url\": \"https://cdn-xalbum2.xiaoniangao.cn/6506ec4500000104bd7c0623?Expires=1704038400&OSSAccessKeyId=LTAI5tB7cRkYiqHcTdkVprwb&Signature=CxJEEcwUR87is9X3li5xP5ZiDvQ%3D\"" +
|
|
|
",\"duration\": 40,\"publish_time\": \"2023-06-08 23:01:47\",\"play_cnt\": 602,\"like_cnt\": 0,\"share_cnt\": 0,\"collection_cnt\": 0,\"comment_cnt\": 0,\"crawler_rule\": {\"period\": { \"max\": 3, \"min\": 3 },\"duration\": { \"max\": 999999999999999, \"min\": 40 },\"play_cnt\": { \"max\": 999999999999999, \"min\": 500 }},\"width\": 450,\"height\": 254}";
|
|
|
|
|
|
TopicMessage pubMsg = new TopicMessage(s.getBytes());
|