-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
hacktoberfestValid Issue for HacktoberfestValid Issue for Hacktoberfest
Description
Today I learned that when you have a connection in a channel, and you broadcast a message to that channel, Cable will log once for each connection on that channel...
So this means, if you have a chat channel with 100 users, and you send "hi", your server will log out the "hi" broadcast 100 times:
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
▸ ChatChannel transmitting {"event" => "ChatMessage", "id" => "10170723-83be-4918-b00a-e9bcc95a6227", "type" => "ChatMessageReceived", "text" => "hi", "createdAt" => "2023-06-27T16:41:18Z"} (via streamed from chatroom:1)
....
For now, you can disable logs with Cable::Logger.level = :none
Metadata
Metadata
Assignees
Labels
hacktoberfestValid Issue for HacktoberfestValid Issue for Hacktoberfest