Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

How to avoid Queue limit reached warning when subscribing to a topic.


I have a system plugin which replays a saved log file and subscribes to its contacts topic. In the callback function I save the contacts to MongoDB, this being a lengthy operation and after some time the queue limit of the topic gets full and I start losing messages.

Warning [] Queue limit reached for topic ../physics/contacts, deleting message. This warning is printed only once.

How can I avoid this? Speed is not important since I am replaying a log file.

Currently I am doing it by pausing the world, and with a separate thread I step into the simulation one step at a time, and between them a small sleep time, so MongoDB has time to write everything.

Cheers, Andrei