java-sdk icon indicating copy to clipboard operation
java-sdk copied to clipboard

AMOP广播普通消息日志提示错误

Open 13813385093 opened this issue 2 years ago • 4 comments

JDK版本 2.9.3

<dependency>
	<groupId>org.fisco-bcos.java-sdk</groupId>
	<artifactId>fisco-bcos-java-sdk</artifactId>
	<version>2.9.3</version>
</dependency>

通过广播发送消息

public void sendNormalMsg(String topic, String msg) {
	Amop amop = bcosSDK.getAmop();
	AmopMsgOut msgOut = new AmopMsgOut();
	msgOut.setTopic(topic);
	msgOut.setType(TopicType.NORMAL_TOPIC);
	msgOut.setContent(msg.getBytes());
	amop.broadcastAmopMsg(msgOut);
}

发出的消息,其它节点可以正常接收到,但是发送方会提示timeout

2024-02-03 16:59:05.039 [channelProcessor] ERROR org.fisco.bcos.sdk.amop.topic.AmopMsgHandler - can not found response callback, timeout:[...]

这个错误的原因是什么?

13813385093 avatar Feb 03 '24 09:02 13813385093

you can set timeout and increase the timeout period

LucasLi1024 avatar Feb 21 '24 03:02 LucasLi1024

默认的timeout=5000,我也尝试设置过更大的超时时间。依然会提示这个错误。 我想专门说明的是:我发送的是一个广播消息,而amop的广播消息是不需要设置应答回调函数的。目前的现象是,我从一个节点发送的广播消息,其它几个节点都可以正常收到并处理。但是在发送节点依然会记录一条这样的错误日志。

13813385093 avatar Feb 21 '24 06:02 13813385093

我看了。广播发送的类型是53,但是实际接收的类型是49,不知道为啥

zflzqy avatar Mar 21 '24 03:03 zflzqy