Code Monkey home page Code Monkey logo

Comments (6)

cczhong11 avatar cczhong11 commented on June 8, 2024

微信服务器在将用户的消息发给公众号的开发者服务器地址(开发者中心处配置)后,微信服务器在五秒内收不到响应会断掉连接,并且重新发起请求,总共重试三次,如果在调试中,发现用户无法收到响应的消息,可以检查是否消息处理超时。关于重试的消息排重,有msgid的消息推荐使用msgid排重。事件类型消息推荐使用FromUserName + CreateTime 排重。
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
我也遇到了同样的问题

from werobot.

SMU-Rainflow avatar SMU-Rainflow commented on June 8, 2024

服务端如果5s内不返回任何消息,微信会重发客户的消息,微信重发了两次,所以才会执行了三次。你可以收到消息后把业务逻辑放到子线程中处理,然后return ""。这样微信服务器就不会重发了

from werobot.

ericzikun avatar ericzikun commented on June 8, 2024

服务端如果5s内不返回任何消息,微信会重发客户的消息,微信重发了两次,所以才会执行了三次。你可以收到消息后把业务逻辑放到子线程中处理,然后return ""。这样微信服务器就不会重发了

子线程中,你是采用客服消息的方式 继续向指定用户发送消息的吗

from werobot.

SMU-Rainflow avatar SMU-Rainflow commented on June 8, 2024

也用了文本消息,在实践中,至少是可以回复两条的

from werobot.

bianningtao avatar bianningtao commented on June 8, 2024

from werobot.

yuezx avatar yuezx commented on June 8, 2024

我用了两个线程现在已经解决了,我把ChatGPT接到了我的公众号上,就是为了解决响应速度的问题,现在已经正常运行一个月了 | | ab2961513324 | | @.*** |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年04月22日 16:28 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [offu/WeRoBot] @.获取用户消息并且执行时,它自动获取了三遍用户消息,并且执行了三遍我的代码逻辑 (Issue #801) | 服务端如果5s内不返回任何消息,微信会重发客户的消息,微信重发了两次,所以才会执行了三次。你可以收到消息后把业务逻辑放到子线程中处理,然后return ""。这样微信服务器就不会重发了 子线程中,你是采用客服消息的方式 继续向指定用户发送消息的吗 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

服务端如果5s内不返回任何消息,微信会重发客户的消息,微信重发了两次,所以才会执行了三次。你可以收到消息后把业务逻辑放到子线程中处理,然后return ""。这样微信服务器就不会重发了

请问如何回复两次消息呢?主进程是正常return "",回复了一次,业务逻辑放到子进程之后,是要主动给客户发消息吗?怎样实现主动发消息呢?还是用别的方式实现?

from werobot.

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.