为什么我会收到“服务不可用”信息使用 XMPP 时是否有多个聊天发送?
我用 Python 和 C# 制作了一个简单的 IM 客户端,分别使用了一些不同的 XMPP 库。
它们作为简单的自动应答器或琐碎的机器人工作得很好,但是当我把它们变成聊天室时(即一条消息被反映到许多其他 JID),我突然开始从 Google talk 服务器收到 503 服务不可用的响应。
我应该从哪里开始寻找解决这个问题的方法?鉴于我使用过多种语言和库,我认为这不是我的特定设置的问题。我正在使用库提供的各种示例。
I have made a simple IM client in both Python and C#, using a few different XMPP libraries for each.
They work very well as simple autoresponders, or trivial bots, but when I turn them into chat rooms (ie, a message gets reflected to many other JIDs), I suddenly start getting 503 service-unavailable responses from the Google talk server.
Where should I start looking to resolve this issue? Given that I have used several languages and libraries, I don't think this is a problem with my particular setup. I am using the various examples provided with the libraries.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您尝试向其发送消息的所有人都在您的公鸡中吗?
否则 GTalk 将不允许发送消息,而是返回错误 503。
有一个洋泾浜错误跟踪器描述了类似的问题:
Pidgin #4236
如果您确定拥有以下位置的所有 JID您还应该检查并行发送的消息数量。谷歌将限制单条消息的数量
JID允许在指定的时间内发送。
Do you have all people you try to send messages to in your rooster?
Otherwise GTalk won't allow the message to be sent and instead return Error 503.
There was a pidgin bug tracker describing a similar problem:
Pidgin #4236
If you're sure you have all the JIDs in your rooster you should also check how manny messages are send in parallel. Google will limit the count of messages a single
JID is allowed to send in a specified period of time.
如果您希望创建实际的聊天室,为什么不使用 jabber 服务器来托管这些聊天室(遵循 http://xmpp.org/extensions/xep-0045.html - ejabberd 默认具有这些,并且大多数 jabber 服务器都有插件来实现它们),然后让您的机器人加入该房间(大多数客户端支持这个 - 不幸的是 Google Talk 不支持)?
If you're looking to create actual chat rooms, why not rather get a jabber server to host those (following http://xmpp.org/extensions/xep-0045.html - ejabberd has these as default and there are plugins for most jabber servers to implement them), and then have your bot join that room (most clients support this - Google Talk doesn't unfortunately)?