How to protect the subscriber's long polling from spam?

Plan to create a chat between users on the basis of the module with nginx-push-stream-module which provides long polling. It turns out that each user creates a subscription, and anyone can use this subscription to overwhelm the user with spam. The question is, how can I most effectively and just not allow the spam through langoling?
August 23rd 19 at 10:51
2 answers
August 23rd 19 at 10:53
Anti-Spam features try
August 23rd 19 at 10:55
Can try project there with spam problems should arise. Here is an example chat

Find more questions by tags JavaScriptLong pollingPHP