-
Notifications
You must be signed in to change notification settings - Fork 485
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
Weird NPE on pub socket #76
Comments
Could you please post your SUB part of the failed case? |
@miniway |
Please try with a modified jar, https://www.dropbox.com/s/7xvbttps35a0j5b/jeromq-0.3.0-SNAPSHOT.jar It contains a fix at the Mtrie.java. If it fixes your problem, I'm going to publish the fix to public. |
ok, I'll try this new jar, thx~ |
still remains the problem... :( |
:( |
Please try it once more with https://www.dropbox.com/s/7xvbttps35a0j5b/jeromq-0.3.0-SNAPSHOT.jar The url is the same before but the file has an another fix. |
The topics are like "ping", "chat" etc., just a fixed set of Strings. I'll test on the new jar, hope it'll work :) |
have run the new jar for a day without the NPE, thought it ok, thx~ |
it would be nicer if u merge the change to the master, so I don't need to maintain the jar myself instead of maven~ |
I've also updated the jeromq-0.3.0-SNAPSHOT at sonatype. Your maven will download the latest jar |
This was my pseudo code in the beginning (in an singleton service object):
pub = ctx.createSocket(ZMQ.PUB);
pub.bind("tcp://*.5556");
While(!stop) {
MyObject o = aConcurrentQueue.poll()
if (o != null) {
pub.sendMore(e.getTopic());
pub.send(e.getBody());
} else {
Thread.sleep(10);
}
}
However, it produced NPE like:
java.lang.NullPointerException
at zmq.Mtrie.match(Mtrie.java:353)
at zmq.XPub.xsend(XPub.java:179)
at zmq.SocketBase.send(SocketBase.java:598)
at org.zeromq.ZMQ$Socket.send(ZMQ.java:1002)
at org.zeromq.ZMQ$Socket.send(ZMQ.java:988)
(btw, I'm using jeromq 0.3.0)
Can't really figure out why this happened, any help would be thankful!
The text was updated successfully, but these errors were encountered: