On Oct 25, 2011, at 10:44 AM, tlrx wrote:

> Thanks again Chuck.
> 
> The REP is a mistake, it was ZMQ.XREP but i desparetly tried with something 
> else (REP for this copy/paste).
> 
> I checked the Java examples again but there is no example that follows a XREQ 
> ROUTER DEALER QUEUE XREP pattern.
> 
> In the Java example, sometimes a empty string is send 
> (https://github.com/imatix/zguide/blob/master/examples/Java/lruqueue.java)  
> sometimes no null/empty string is sent at all 
> (https://github.com/imatix/zguide/blob/master/examples/Java/rtdealer.java). 
> In the REP example, sometimes the last byte of the message is set to zero.
> 
> I tried the previous code with XREP and replying an empty string, but the 
> problem is still here. I'm definitely missing something...

Well, it's tough to help you with your code when you paste the "wrong" thing 
and say it doesn't work.

If you haven't read the guide yet, please do so. There is a chapter on customer 
request/reply routing using ROUTER/DEALER sockets. There was a Java code 
example attached to part of it that you can read here:

http://zguide.zeromq.org/java:rtdealer

This is the same code example you posted above. If it isn't working, then 
please tell us what kind of error it is producing or what behavior you see. If 
it *is* working, then please explain what part of it confuses you.

At this point, I'm curious to know if you are using 2.1.10 for testing or if 
you are using 3.03 for testing. In 3.x, the API changed such that XREQ/XREP are 
no longer synonyms for DEALER/ROUTER, so connecting the two of them may or may 
not work since the routing envelopes are handled a bit differently. There was a 
recent thread started on this topic (within the last week).

cr

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to