GithubHelp home page GithubHelp logo

Comments (3)

yanglbme avatar yanglbme commented on August 12, 2024 1

@ZHOUZONGHAN

[0,4294967295] 的范围,实际上已经超过了 int 的最大值 2147483647,所以我们定义成 long

from qcloud-im-server-sdk-java.

ZHOUZONGHAN avatar ZHOUZONGHAN commented on August 12, 2024 1

提一个建议哈 我觉得可以在msgRandom的set方法中加一个校验 或者直接使用Integer类型接收 毕竟只是用于同一秒内同一用户的消息去重 2147483647已经够了 但是如果用long接收超过的概率太大了 我一开始没留意 直接用Long类型的随机数生成器生成的值基本上很容易超出腾讯云的范围

from qcloud-im-server-sdk-java.

yanglbme avatar yanglbme commented on August 12, 2024 1

这里我们考虑过,目前腾讯云对于超出范围的 msgRandom,会给出如下的报错:

SendMsgResult{msgTime=null, msgKey='null', actionStatus='FAIL', errorInfo='Invalid format of MsgRandom', errorCode=90005}

如果 sdk 来校验,无非也是抛出异常提示。所以我们决定由开发者自己来控制就好了。

from qcloud-im-server-sdk-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.