I had the same problem (it was not the exact frame rate, which was the problem, it was the actual lag). When I kill all image sources (rosbag, camera driver, etc.), My node will process ~ 5-10 frames even after the source was killed (and I was sure that I had queue_size=1 )
Here is the github issue I made and it was resolved. It turns out that several queues are involved (and not just the one you set queue_size to 1). In my case, the default buff_size was less than my images, so my node did not process them fast enough, and there was always a backup of the images in some queue.
TL DR increase buff_size for your subscriber, as I did here . It worked for me :)
source share