GithubHelp home page GithubHelp logo

cljzmq's People

Contributors

drzymalanet avatar hintjens avatar honza avatar hughpowell avatar ianbishop avatar jjcomer avatar mknoszlig avatar sjlnk avatar trevorbernard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cljzmq's Issues

Is this library still maintained?

Hi there, I notice that there hasn't been any activity on this library in some time. Is it still maintained? If not should the readme be updated with a disclaimer?

Pub Sub not working without interim sleep

The following sample doesnt work without the sleep statement, i have excluded jzmq and using jeromq. moreover i dont see any error.

(ns exp.distributed
  (:use [clojure.tools.logging :only (warn info error)])
  (:require [zeromq.zmq :as zmq]
            [clojure.core.async :as async :refer :all]))

(defn start-subs []
  (future
    (let [ctx (zmq/context 1)]
      (with-open [sub (doto (zmq/socket ctx :sub)
                        (zmq/connect "tcp://127.0.0.1:5556")
                        (zmq/subscribe "topic"))]
        (dotimes [i 10]
          (info (zmq/receive-str sub)))))
    (info "listeners quits.")))

(defn start-pubs []
  (future
    (let [ctx (zmq/context 1)]
      (with-open [pub (doto (zmq/socket ctx :pub)
                        (zmq/bind "tcp://*:5556"))]
        (Thread/sleep 1000);removing this doesnt works
        (dotimes [i 10]
          (zmq/send-str pub (format "topic %d" i)))))
    (info "publisher quits.")))

(do
    (start-subs)
    (start-pubs))

Please release version 0.1.5

  1. It seems there have been no commits for the past 1.5 years (latest commit 7a84f43 on Jan 6, 2015 as of this writing, July 13, 2016).
  2. There were 19 commits (including merges) since 0.1.4
  3. I'd be happy to do it myself, but I don't have the clojars permissions for this package.

Thank you.

(close context) doesnt work with JeroMQ

I think we just need another multimethod.

(defmethod close org.zeromq.ZMQ$Context
  [^org.zeromq.ZMQ$Context zctx]
  (.term zctx))

Although i am little confused why doesnt cljzmq's context match with JeroMQ's ZContext.

need to add jzmq dependency manually?

if I create a project and add the cljzmq dep and try to require it, it fails trying to load jzmq, if I add it to the deps with something like:

:dependencies [[org.clojure/clojure "1.5.1"]                                 
             [org.zeromq/jzmq "2.2.1"]                                     
             [org.zeromq/cljzmq "0.1.1"]] 

it fails in the repl with

user=> (require '[zeromq.zmq :as zmq])

UnsatisfiedLinkError no jzmq in java.library.path  java.lang.ClassLoader.loadLibrary (ClassLoader.java:1856)

which is the recommended way to make it work?

send-str-timeout-test method in zmq-test.clj returns an exception?

I am a newbie so forgive my naive question in advance.

deftest send-str-timeout-test in zmq-test.clj returns the following exception:

clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: No such var: zmq/set-send-timeout, compiling:(/Users/spaceshuttle/Documents/FP/Clojure/source_code/my-code/second-jzmq/test/second_jzmq/zmq-test.clj:26:20)

is this what I should be expecting? or did I go wrong somewhere? Thanks for your help in advance.

Reflection warning

I get the following reflection warning for cljzmq:
Reflection warning, zeromq/zmq.clj:161:6 - call to method send on org.zeromq.ZMQ$Socket can't be resolved (no such method).

Trying to use cljzmq on Mac OSx 10.8.5

Hello, trying to get the examples working, but am getting a java.lang.UnsatisfiedLinkError error. Here's my steps:

I installed the latest zeromq via brew:

joker:~ dan.young$ brew install zeromq
==> Downloading http://download.zeromq.org/zeromq-4.0.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/zeromq-4.0.4.tar.gz
==> ./configure --prefix=/usr/local/Cellar/zeromq/4.0.4
==> make
==> make install
==> Caveats
To install the zmq gem on 10.6 with the system Ruby on a 64-bit machine,
you may need to do:

ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=/usr/local/opt/zeromq

==> Summary
🍺 /usr/local/Cellar/zeromq/4.0.4: 62 files, 2.7M, built in 36 seconds
joker:~ dan.young$

joker:~ dan.young$ ls -lrt /usr/local/lib/libz*
lrwxr-xr-x 1 dan.young staff 39 Apr 21 11:01 /usr/local/lib/libzmq.dylib -> ../Cellar/zeromq/4.0.4/lib/libzmq.dylib
lrwxr-xr-x 1 dan.young staff 35 Apr 21 11:01 /usr/local/lib/libzmq.a -> ../Cellar/zeromq/4.0.4/lib/libzmq.a
lrwxr-xr-x 1 dan.young staff 41 Apr 21 11:01 /usr/local/lib/libzmq.3.dylib -> ../Cellar/zeromq/4.0.4/lib/libzmq.3.dylib

Here's my project.clj:

(defproject zero-mq "0.1.0-SNAPSHOT"
:description "zero mq"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.zeromq/cljzmq "0.1.4"]]
:jvm-opts ["-Djava.library.path=/usr/lib:/usr/local/lib"]
:main zero-mq.rrbroker)

in my zero-mq.rrbroker

ns zero-mq.rrbroker
(:require [zeromq.zmq :as zmq]
))

(println (. System getProperty "java.library.path"))

then try to run lein repl

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jzmq in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1764)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1044)

Any idea on what I'm doing wrong?

Behavior of receive-str on socket timeouts.

Presently, receive-str will raise a NullPointerException if a timeout occurs after (.setReceiveTimeOut socket timeout). I believe that it should return nil. What is the correct behavior?

why is cljzmq 0.1.4 looking for libzmq.so.0

I am getting the dreaded unsatisfied link error. I spent some time chasing it today. I notice that ldconfig does not create a softlink pointing libzmq.so.0 to blahblah/libmq.so.3 . Should it?
Why is cljzmq 0.1.4 looking for .0?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.