mitch p | 19 May 2013 21:49
Picon

memory preallocation for realtime use cases

Hi,

I read pdf(s) and code to see if zmq could fit my current use cases

I've got some problems to understand the memory management:

- for "send": ok it seems that i can manage my own list of buffers and be informed with the free callback the the buffer is not used by the lib. There is the malloc for the content_t part of a msg...

- for the "recv": even if i prepare a msg with a data buffer, it is freed before the reading (i see msg_close when i follow the source code)

so i wonder how can I alloc all the memory at start of my app, and say to zmq lib "work with that"

can you light me?

with my best regards, and my apologies for my experimental english

michel pacilli

_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Erwin Karbasi | 19 May 2013 11:53

Enabling log

Hello All,

Is it possible to enable built-in trace/debug level logging for ZeroMQ?

Thanks,
Erwin Karbasi
AT&T, Senior Software Architect
_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Andrew Hume | 19 May 2013 07:55
Picon

ZMQ_PAIR sockets

i thought i understood ZMQ_PAIR sockets, but apparently not.
the man page mentions that they are experimental, but otherwise
doesn't really say how they work.

what are the semantics?

-----------------------
Andrew Hume
623-551-2845 (VO and best)
973-236-2014 (NJ)
andrew <at> research.att.com



_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Steven McCoy | 19 May 2013 05:22
Picon
Favicon

MSVC 2008 no longer supported in master?

I haven't been checking every platform, but master requires stdint.h which only hit Microsoft with MSVC 2010SP1.



-- 
Steve-o
_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Mark Sutheran | 18 May 2013 19:56
Picon
Favicon

PUB/SUB appears to be 'missing' first byte 3.2.2

Hi,

I appear to have a issue with PUB/SUB apparently 'dropping' the first byte.

Setup: 
 * Basic PUB/SUB running on same machine over TCP/localhost. 
 * Message has first 4 bytes as subscription id, rest payload

Problem:
 * On dev box runs fine
 * On prod box the subscriber sees no messages 
 * The reason is that the received message is 'missing' the first byte

Logs:

Machine 1 (Ubuntu 12.04 64, JZMQ/ZMQ 3.2.0) runs fine, e.g.:

01:19:10:042 DEBUG [qtp1866572071-24] Publishing: [0, 0, 0, 13, -49, 0, 0, 1, 62, -72, -90, -29, 63, 7, -108, -53, 63, -12, -122, -13, 110, -8, 5, 96, -53, 64, 89, -9, -101, -128, 35, -90, -50, -53, 0, 0, 0, 0, 0, 0, 0, 0, -53, 64, 68, 0, 0, 0, 0, 0, 0, 0]
01:19:10:042 DEBUG [SubscriptionDataHandlerThread] Received data: [0, 0, 0, 13, -49, 0, 0, 1, 62, -72, -90, -29, 63, 7, -108, -53, 63, -12, -122, -13, 110, -8, 5, 96, -53, 64, 89, -9, -101, -128, 35, -90, -50, -53, 0, 0, 0, 0, 0, 0, 0, 0, -53, 64, 68, 0, 0, 0, 0, 0, 0, 0]

Machine 2 (Ubuntu 12.04 64, JZMQ/ZMQ 3.2.2) and the subscriptions 'disappear'... digging into it the receiver appears to drop the first byte of the messages 100% of the time, e.g.:

05:20:01:603 DEBUG [qtp1038722314-22] Publishing: [0, 0, 0, 13, -49, 0, 0, 1, 62, -72, -90, 61, 85, 7, -108, -53, 63, -12, -122, -13, 110, -8, 5, 96, -53, 64, 89, -9, -101, -128, 35, -90, -50, -53, 0, 0, 0, 0, 0, 0, 0, 0, -53, 64, 68, 0, 0, 0, 0, 0, 0, 0]
05:20:01:603 DEBUG [SubscriptionDataHandlerThread] Received data: [0, 0, 13, -49, 0, 0, 1, 62, -72, -90, 61, 85, 7, -108, -53, 63, -12, -122, -13, 110, -8, 5, 96, -53, 64, 89, -9, -101, -128, 35, -90, -50, -53, 0, 0, 0, 0, 0, 0, 0, 0, -53, 64, 68, 0, 0, 0, 0, 0, 0, 0]

Connecting Machine 1 (SUB) to Machine 2 (PUB) also produces the same results.

It's presumably an issue with my code however, it's the same code running on both boxes. The one obvious difference is the ZMQ version, though I've not seen this before and it doesn't seem to correspond to anything I can see on the buglist. Any ideas?

Thanks in advance,
Mark
_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
张龙华 | 17 May 2013 19:31
Favicon

about the swap option in zmq3.2


Hi, all.
I noticed that the swap option are disappeared in zmq3.2. So if I want to transmit
files with zmq, the memory will increase  too much, so, how to resolve this problem
in zmq3.2?
Thank you very much.

Best Regards.

Richard
Nishant Mittal | 16 May 2013 16:07

Do Sockets free memory after..

storing say a million msgs in its outgoing buffer and when the client has finally caught up and consumed all msgs?

I am seeing that the memory usage goes up as the client is slow or not there but even after the client comes back and consumes all msgs.. the memory stays where it was.. any comments?

thanks,

--
Nishant Mittal           
Director, Product Development
Rosenblatt Securities Inc.
20 Broad Street
New York, NY 10005            

Direct: 212-607-3159
Mobile: 646-504-2629

Disclaimer:

The information contained in this communication is not intended as an offer or solicitation for the purchase or sale of any securities, futures, options, or any other investment product. This communication is not research, and does not contain enough information on which to make an investment decision. The information herein has been obtained from various sources. We do not guarantee its accuracy. Any opinion offered herein reflects Rosenblatt Securities Inc. current judgment and may change without notice.          Member: NYSE, SIPC, FINRA

_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Pieter Hintjens | 16 May 2013 08:18
Picon
Gravatar

Re: recvmsg deprecated

Google "zeromq-dev zmq_recv zmq_recvmsg"

On May 16, 2013 6:33 AM, "asif saeed" <asif.lse2 <at> gmail.com> wrote:
_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
许海玲 | 16 May 2013 05:05
Picon

Help on the PUB/SUB socket reconnection.

Hello zmq guys,

I am writing this letter to confirm whether zmq PUB/SUB socket tcp connection have no timeout mechanism.

Recently, I am coding with ZMQ3.2.2 API.  In my program, there are two nodes, one is publisher, the other is subscriber, communicated with zmq tcp PUB/SUB sockets.  These two nodes are running on virtual machine. When the publisher's VM is RESET(code restart),  the subscriber won't received any message from the restarted publisher. However,  restart the publisher program, reboot in guest os, disconnect interface for a period of time won't lead to such result, subscriber always reconnects to the new started publisher.

With tcpdump, we noticed that
1)  restart the publisher program or reboot the guest os, makes publisher zmq send a FIN to terminate the connection. And when publisher restarts, subscriber will reconnect to it automatically.

2) Reset the VM of publisher, no FIN is sent out and when publisher restarts, the subscribe do nothing, no communication is observed, so the subscribe can't detect the previous connection is lost.

3)  Reset the VM of subscriber, no FIN is sent out, and publisher is always sending messages to the previous connection. Of course, a new connection is established, and messages are also sent out via this connection.

With the above observation, we guess that zmq PUB/SUB has no connection timeout mechanism, the connection only be terminated when one of the ends sends a FIN. I am curious about the whether it is the design target, or a bug. Maybe we must implements timeout with heatbeat on uplayer, to avoid lost connection when publisher is down for power losing.

Thanks for your information.

Hailing.
_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
gonzalo diethelm | 15 May 2013 18:26
Picon

Oddities when working with Cygwin environment

I have been doing some development of 0mq-based C (console) applications in cygwin, and there are two oddities that I would like to comment on. I would like to know if anybody else sees these issues:

 

1.       Behavior of Control-C: for certain operations (I believe mostly when calling zmq_recv()), Control-C does not abort the operation. The only way to exit the application is killing the process. I am properly handling the return value of zmq_recv().

2.       This may have nothing to do with 0mq proper, but sometimes I get the message “fatal error - cygheap base mismatch detected” when running my application. Right after that, I re-run it and it works ok.

 

My environment is:

 

·         Windows 7 64 bit (all patches applied as of today).

·         Cygwin 1.7.18(0.263/5/3) (updated yesterday, with gcc 4.5.3).

·         0mq 3.3.0 (cloned from github yesterday) compiled with Visual C++ 2010 Express.

 

Thanks for any hints,

 

--

Gonzalo Diethelm

DCV Chile

 

Declaración de confidencialidad: Este Mensaje esta destinado para el uso de la o las personas o entidades a quien ha sido dirigido y puede contener información reservada y confidencial que no puede ser divulgada, difundida, ni aprovechada en forma alguna. El uso no autorizado de la información contenida en este correo podrá ser sancionado de conformidad con la ley chilena. Si usted ha recibido este correo electrónico por error, le pedimos eliminarlo junto con los archivos adjuntos y avisar inmediatamente al remitente, respondiendo este mensaje. Disclosure: This Message is to be used by the individual, individuals or entities that it is addressed to and may include private and confidential information that may not be disclosed, made public nor used in any way at all. Unauthorized use of the information in this electronic mail message may be subject to the penalties set forth by Chilean law. If you have received this electronic mail message in error, we ask you to destroy the message and its attached file(s) and to immediately notify the sender by answering this message.
_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Hamed Afshar | 15 May 2013 14:14
Picon
Favicon

sending and receiving multiple messages and replies from same thread

Hi,
I want to use zeromq for the following scenario, but can't recognize the proper pattern for this.
Server listens to port 5555. When a client connects to server, thread A handles this connection and from now on, every request from client goes to thread A, and thread A sends a reply to the client.

Currently, I am using normal req/rep pattern with Router/Dealer on top to handle multithreading. but every request from a client is round robined and load balanced between thread. What I need, is that when a thread answers the first request from a client, from now on, the same thread answer the rest of the requests from that client. (like having a persistent connection with client).

Is this scenario possible with ZMQ? if yes, how?

Thank you very much for your assistance,
Jerry
_______________________________________________
zeromq-dev mailing list
zeromq-dev <at> lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Gmane