Skip to content

REQ socket drop message silently if two message coming together very fast #872

@ruleil

Description

@ruleil

This is a reproducible message silently dropped issue with a very small changes to the lbbroker.cpp.

https://github.com/booksbyus/zguide/blob/master/examples/C%2B%2B/lbbroker.cpp

In the lbbroker.cpp file, a worker will be pop out from work_queue when handling a request from client thread. If we modify the line 163 from "std::string worker_addr = worker_queue.front();" to "static std::string worker_addr = worker_queue.front();", as the following picture shows. All request will be forwarded to one worker, then we can see some messages will be dropped by the REQ socket the worker. Is it normal? REQ socket cannot receive other message when the worker logic is running ?

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions