main
HuangHai 2 months ago
parent e42efb2788
commit 3c1cecbccd

@ -113,7 +113,7 @@ public class RocketMqKit {
SendResult sendResult = producer.send(msg, 10000);
System.out.printf("同步发送结果:%s%n", sendResult);
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
} finally {
// 确保producer被正确关闭
if (producer != null) {
@ -144,11 +144,11 @@ public class RocketMqKit {
@Override
public void onException(Throwable e) {
System.out.printf("异步发送异常:%s%n", e.getMessage());
e.printStackTrace();
logger.error(e.getMessage());
}
}, 10000);
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
} finally {
// 注意异步发送时不能立即关闭producer需要等待回调完成
// 实际应用中应该有更好的生命周期管理
@ -175,21 +175,21 @@ public class RocketMqKit {
// 发送10条消息相同orderId的消息会进入同一个队列
for (int i = 0; i < 10; i++) {
int orderId = i % 10;
Message msg = new Message(topic,
tags[i % tags.length],
"KEY" + i,
("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET));
SendResult sendResult = producer.send(msg,
(List<MessageQueue> mqs, Message msg1, Object arg) -> {
Integer id = (Integer) arg;
int index = id % mqs.size();
return mqs.get(index);
}, orderId);
Message msg = new Message(topic,
tags[i % tags.length],
"KEY" + i,
("Hello RocketMQ " + i).getBytes(RemotingHelper.DEFAULT_CHARSET));
SendResult sendResult = producer.send(msg,
(List<MessageQueue> mqs, Message msg1, Object arg) -> {
Integer id = (Integer) arg;
int index = id % mqs.size();
return mqs.get(index);
}, orderId);
System.out.printf("顺序消息发送结果:%s%n", sendResult);
}
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
} finally {
if (producer != null) {
producer.shutdown();
@ -221,10 +221,10 @@ public class RocketMqKit {
} else {
System.out.println("本轮没有找到需要消费的消息!");
}
consumer.commitSync(); // 提交消费位点
consumer.commit();
}
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
} finally {
if (consumer != null) {
consumer.shutdown();
@ -234,7 +234,7 @@ public class RocketMqKit {
public static void main(String[] args) {
// 模拟发送
logger.info("当前服务器:"+nameServer);
logger.info("当前服务器:" + nameServer);
try {
@ -260,7 +260,7 @@ public class RocketMqKit {
try {
consumerPull();
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
}
});
thread.start();
@ -268,7 +268,7 @@ public class RocketMqKit {
shutdown(); // 关闭资源
System.exit(0);
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
}
}
}

@ -1,16 +0,0 @@
# 官网
https://docmee.cn/
# 用户名与密码
18686619970
密码:手机验证码
# 体验
https://www.veasion.cn/AiPPT/
# 充值
https://open.docmee.cn/open/workspace/top-up
未充值
# 模板选择【展示】
https://dsideal.obs.cn-north-1.myhuaweicloud.com/HuangHai/BlogImages/202505131336410.png

@ -1 +0,0 @@
https://help.aliyun.com/zh/model-studio/emo-api?spm=a2c4g.11186623.help-menu-2400256.d_2_3_4_1.7d8a5f84mfOU9j

@ -1,9 +0,0 @@
# 可灵AI使用指南图片生成
https://docs.qingque.cn/d/home/eZQApd0EZqQHWXBEi7lL16_lD?identityId=26L1FFNIZ7r#section=h.60mmflz96wnl
# 可灵控制台
https://console-cn.klingai.com/console/expense-center/resource-pack-manage
# 登录
18686619970
获取验证码登录

@ -1,39 +0,0 @@
# 官网
https://www.liblib.art/apis
# 账号
18686619970
手机验证码登录
# 访问凭证
AK: sOCtVLVTNOZkRMajlhzCmg
SK: PUe8QTRG9i0G9EbpedHmIpLQ0FyxoYY9
# 接口文档
https://liblibai.feishu.cn/wiki/UAMVw67NcifQHukf8fpccgS5n6d
计划
API试用计划
到期时间
2025/05/22 23:59:59
剩余积分
500
购买积分
并发任务数
1个
# LiblibAI工作流
社区商用工作流和个人本地工作流均可支持调用。工作流挑选和商用查询可至https://www.liblib.art/workflows
# - 星流Star-3 Alpha适合对AI生图参数不太了解或不想复杂控制的用户。搭载自带LoRA推荐算法对自然语言的精准响应提供极致的图像质量能够生成具有照片级真实感的视觉效果不能自由添加LoRA仅支持部分ControlNet。生图效果可至星流官网https://xingliu.art/体验。
# - LiblibAI自定义模型若需要特定LoRA和ControlNet只能选此模式适合高度自由、精准控制和特定风格的场景基于F.1/XL/v3/v1.5等基础算法支持自定义调用LiblibAI内全量30万+可商用模型和任意私有模型。最新开源模型和插件第一时间更新。模型挑选和商用查询可至本文档3.1或https://www.liblib.art/。
# 参考文档
https://liblibai.feishu.cn/wiki/UAMVw67NcifQHukf8fpccgS5n6d
https://www.liblib.art/workflows

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 KiB

@ -1,3 +0,0 @@
https://goapi.gptnb.ai/account/profile
littlehb
mdcija780522
Loading…
Cancel
Save