[zeromq-dev] jeromq - java pojo zeromq

jonas.adler at epiq.se jonas.adler at epiq.se
Thu Aug 23 10:40:46 CEST 2012


Hi!

I added the suggested line and it is working perfectly now, once more,
thank you a lot! You saved me weeks of work and issues!

//Jonas

> Hello,
>
> If you don't set SUBSCRIBE, sub socket will block.
>
> please add the following line before connect.
>
> subscriber.subscribe("")      // please pull the latest source first
>
> Thanks
> Min
>
> 2012/8/22  <jonas.adler at epiq.se>:
>> Hello!
>>
>> Let me first say that this is awesome, and I really love the amount of
>> work you have put into this!
>>
>> However! I cannot get it to work on windows :(
>>
>> I try using this bit of code:
>>
>> public class TestZMQ {
>>
>>         public static void main(String[] args) {
>>                 // Prepare our context and subscriber
>>                 ZMQ.Context context = ZMQ.context(1);
>>                 ZMQ.Socket subscriber = context.socket(ZMQ.SUB);
>>
>>                 // Connect to server
>>                 subscriber.connect("tcp://localhost:5563");
>>                 while (true) {
>>                         // Read envelope with address
>>                         String address = new String(subscriber.recv(0));
>>                         // Read message contents
>>                         String contents = new
>> String(subscriber.recv(0));
>>                         System.out.println(address + " : " + contents);
>>                 }
>>         }
>> }
>>
>> but the program hangs on subscriber.recv(0)!
>>
>> Following the call stack i see that the program gets stuck on:
>>
>> Signaler.wait_event(long) line:108
>>
>> which calls:
>>
>> WindowsSelectorImpl(SelectorImpl).selectNow()
>>
>> Anyone else has this issue? Or any idea on how to solve it? I have tried
>> some debugging, and i know that on a TCP level, i am connected to the
>> server...
>>
>>> Hello
>>>
>>> I'm happy to announce that I've built a jeromq with POJO based on
>>> zeromq-3x c++ sources.
>>>
>>> https://github.com/miniway/jeromq
>>>
>>> The primary purpose of the work was to understand deeply how zeromq
>>> works.
>>> I've got lots of insight and learned a lot from zeromq internals.
>>>
>>> It's in a very early stage and it must have bugs and issues. But I
>>> hope this project help someone who only know java to understand
>>> zeromq.
>>>
>>> Thanks
>>> Min
>>> _______________________________________________
>>> zeromq-dev mailing list
>>> zeromq-dev at lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>





More information about the zeromq-dev mailing list