Giter VIP home page Giter VIP logo

Comments (3)

miniway avatar miniway commented on September 3, 2024

As far as I know reconnecting to ROUTER socket with same identity would not work well in ZMQ.

from jeromq.

hintjens avatar hintjens commented on September 3, 2024

Indeed, this is not how ROUTER sockets work. It would require keeping
internal pipes and messages for sockets, which creates memory leaks.

On Mon, Aug 5, 2013 at 5:55 PM, Dongmin Yu [email protected] wrote:

As far as I know reconnecting to ROUTER socket with same identity would
not work well in ZMQ.


Reply to this email directly or view it on GitHubhttps://github.com//issues/79#issuecomment-22115746
.

from jeromq.

raffian avatar raffian commented on September 3, 2024

Ok, so that explains my issue. But for async IM/chat, clients have to be uniquely addressable, otherwise, how can I route messages to clients if I can't identify them? Is there a more appropriate socket combination to make this work?

Wait a minute, I think I got it. If the chat client provides a random id (instead of static one), or just uses the one provided by ROUTER, I can map userId to the connection id on the server, then route accordingly between chat clients. If the client drops off, it reconnects with a different id which I can track on the server. I believe this is more reasonable, the static identity does not make sense, I get it.

I started a question on SO on this topic in case others had the same issue:
http://stackoverflow.com/q/18048951/791406

from jeromq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.