• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JeroMQ: trying to get a client/server sample working

 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to get JeroMQ working for my little project. It is a UI and a backend server which handles the logic. But i can not get a JeroMQ Server/Client communication working.





I can connect to the server in the client and also send() returns true, but on the server side i never get to "Received ..."
Can someone tell me what is wrong?
 
Rancher
Posts: 5095
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a forum for JeroMQ questions?  Have you tried there?
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no, there is no forum. if there would be such, i would not have posted here.
 
Norm Radder
Rancher
Posts: 5095
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the API doc for the classes and packages you are using.
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no API doc - jeromq implements zeromq (http://zeromq.org/intro:read-the-manual)
The only documentation is the bible (link above) and the junit samples https://github.com/zeromq/jeromq/tree/master/src/test/java/guide
 
Norm Radder
Rancher
Posts: 5095
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, maybe there will be some one that is interested to read that.

Otherwise I'd suggest that you write the code using standard java SE classes.
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not want to force others (if they want to implement their own UI) to use java. Unfortunately, REST is not really useful for that scenario. Therefore i prefer some kind of bytestream protocol which can be used in other languages too (zeromq is available for many languages, no brokerserver required etc.)
 
olze oli
Ranch Hand
Posts: 187
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the solution. The client got closed too fast. When send() is called, it returns true meaning: "the message got queued", but that does not mean it got sent. Therefore, implementing autocloseable on the client and closing the ZContext made it.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Olze, can you show the code on how to fix it? I'm having the same problem. Thanks
 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic