How to use jeromq in MATLAB

kdheepak

jeromq is a Java implementation of libzmq. I have a .jar file created from the jeromq source. However, I'm unable to call a class in jeromq from MATLAB. I've used addjavaclasspath and addjavalibrarypath but am still not able to get it working. Does anyone have a simple working example in MATLAB?

kdheepak

I've added the answer here as for reference in case anyone else is interested.

% Author : Dheepak Krishnamurthy
% License : BSD 3 Clause

import org.zeromq.ZMQ;

ctx = zmq.Ctx();

socket = ctx.createSocket(ZMQ.REP);

socket.bind('tcp://127.0.0.1:7575');
message = socket.recv(0);
json_data = native2unicode(message.data)';

message = zmq.Msg(8);
message.put(unicode2native('Received'));
socket.send(message, 0);

socket.close()

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why one might need JeroMQ if it can use JZMQ?

From Dev

How to use Decision Tree Classification Matlab?

From Dev

How to use eig with the nobalance option as in MATLAB?

From Dev

how to use matlab vision.ForegroundDetector with webcam

From Dev

How to make and use many fast functions in Matlab?

From Dev

How to use Timer in Matlab

From Dev

how to use SURFmex library with Matlab?

From Dev

How to use KNN to classify data in MATLAB?

From Dev

How to use tables in older versions of Matlab?

From Dev

How to use cell arrays in Matlab?

From Dev

How do I use MATLAB to solve this PDE

From Dev

Matlab: How to use javaaddpath dynamically

From Dev

How to use least squares method in Matlab?

From Dev

How to use Matlab webread with 2 http headers

From Dev

How to use “Java range slider“ in MATLAB

From Dev

How to use index in MATLAB to find function constraints

From Dev

How to use subsref in MATLAB

From Dev

How use 'waitfor' or 'uiwait' in app designer of MATLAB?

From Dev

How to implement an active & standby queue job-processing system in JeroMQ?

From Dev

PUSH with jeroMQ

From Dev

MATLAB:How to use java code in MATLAB?

From Dev

How to use udp() in MATLAB?

From Dev

How to use the 'if' statement in matlab?

From Dev

How to use cross validation in MATLAB

From Dev

How to use matlab in android application

From Dev

Matlab - how to use specgram function?

From Dev

How to use pcg with a function in MATLAB

From Dev

How to use Matlab to draw a ellipsoid

From Dev

How to use fminunc with summation in matlab?