Comments (6)
微信服务器在将用户的消息发给公众号的开发者服务器地址(开发者中心处配置)后,微信服务器在五秒内收不到响应会断掉连接,并且重新发起请求,总共重试三次,如果在调试中,发现用户无法收到响应的消息,可以检查是否消息处理超时。关于重试的消息排重,有msgid的消息推荐使用msgid排重。事件类型消息推荐使用FromUserName + CreateTime 排重。
https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
我也遇到了同样的问题
from werobot.
服务端如果5s内不返回任何消息,微信会重发客户的消息,微信重发了两次,所以才会执行了三次。你可以收到消息后把业务逻辑放到子线程中处理,然后return ""。这样微信服务器就不会重发了
from werobot.
服务端如果5s内不返回任何消息,微信会重发客户的消息,微信重发了两次,所以才会执行了三次。你可以收到消息后把业务逻辑放到子线程中处理,然后return ""。这样微信服务器就不会重发了
子线程中,你是采用客服消息的方式 继续向指定用户发送消息的吗
from werobot.
也用了文本消息,在实践中,至少是可以回复两条的
from werobot.
from werobot.
我用了两个线程现在已经解决了,我把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)
- Session问题 HOT 1
- 服务器侧获得用户推送的经纬度 HOT 1
- 监听无效果 -- Ineffectiveness Monitoring HOT 1
- 服务器占cpu用100%
- 重复发送同一条消息导致消息返回失败
- [求助]消息发送失败 HOT 3
- 'NoneType' object has no attribute 'writeHeaders'
- 突然100%故障了: Broken pipe HOT 1
- token验证失败
- 如果我想用ImageReply返回图像,只能返回素材库内部的 图像吗?如果想要返回外部图像 应该怎么做?
- 被动回复消息,回复多个图片消息会重复发送同一张图片 HOT 2
- AttributeError: module 'werobot' has no attribute 'WeRoBot' HOT 2
- @myrobot.text回复函数运行超过一段时间会导致连接失败 HOT 1
- 使用PG 做session 存储,报错 psycopg2.errors.UndefinedFunction: operator does not exist: character varying = bytea
- 怎么输入文字返回图片?
- 请问纯python开发的话,在公众号内部实现微信支付的逻辑应该是什么样的呢? HOT 2
- 我的公众号机器人一直回复”再问我一次吧”,无论发什么都是这样回答
- 多个Client会冲突。
- 请问用这个库可以做到让服务器给微信公众号发消息,并显示出来吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from werobot.