Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connected but can not receive msgs in pair-pair pattern #502

Open
yangelaboy opened this issue Sep 9, 2022 · 0 comments
Open

connected but can not receive msgs in pair-pair pattern #502

yangelaboy opened this issue Sep 9, 2022 · 0 comments

Comments

@yangelaboy
Copy link

yangelaboy commented Sep 9, 2022

we encountered a problem:

client of c++ binds to server of scala using jzmq, and the client also binds to another server of c++.

when the client is restarted, it connect to servers normally, but server of scala can not receive any msg, otherwise server of c++ is normal to receive msgs.

codes of scala are as following

val context = new ZContext

val in: ZMQ.Socket = {
     val skt = context.createSocket(0) //pair
     skt.bind(inConf.getOrElse("ipc:///data/soft/ai-access/access-server"))
     skt 
}
threadPool.submit {
        new Runnable {
            override def run(): Unit = {
                try {
                    while (!Thread.currentThread.isInterrupted) {
                        val reply = in.recv(0)
                        // ....
                    }
                } catch {
                    case ex: Exception =>
                }
            }
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant