Problems using RocketChat queue


Hello everyone!

I use RocketChat as a live agent system for my bot platform, all messages go through my bots and RocketChat is only called when I need to contact an agent

I have a doubt regarding rocketchat queues. Currently I don’t use the rocket queue system, I put users to service with agents using the Rest service(I do the detailed explanation in the additional information).

What is my problem right now?
My main problem is that as “STEP 2” is developed, it consumes a lot of memory/CPU because I keep polling to check a room.

How would I like to resolve this?
RocketChat has a queue system and I would like to use it by placing users in that queue and letting RocketChat manage it, is this possible?

My idea is based on other services I know I can put an external queue on RocketChat, however the documentation about this service is not very good which complicates

Any suggestions on how to solve this “problem” are welcome.

Thank you guys!!

Server Setup Information

  • Version of Rocket.Chat Server: 4.1.2
  • Operating System: Ubuntu
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v12.18.4
  • MongoDB Version: v4.4.10
  • Proxy: nginx
  • Firewalls involved: no

Any additional Information

I do the following steps to put a user in contact with the agent:

STEP 1 (Register a new visitor with department name)
POST /api/v1/livechat/visitor/

STEP 2 (Poll to request a room)
GET /api/v1/livechat/room?token=userToken

STEP 3 (Listen to events)
Use node library

  • driver login
  • subscribe to events
  • Handle agent messages and disconnection from agent


  • send agent message
    POST /api/v1/livechat/message
  • Send disconnection from user
    POST /api/v1/livechat/room.close

Hi! Welcome to our forums!

What I have done in previous jobs and see a lot of users doing is to keep all conversations within Rocket.Chat.

So you do an integration with your bot (using one of the bot connectors in Marketplace), and new chats are directly assigned to the bot, either with the option that will assign to bot first, or directing it to a department with only the bot there.

Whenever your bot identify a human is needed, you can then transfer (there is an API for that) this chat to a corresponding department or agent directly. This department will then have the agents that can keep the conversation going.

The external queue you mentioned, is probably this, right?