free buffer callback not called after sending data on disconnecting subscriber

12 views
Skip to first unread message

AS

unread,
Jul 10, 2018, 10:34:57 AM7/10/18
to zeromq
Hi,

I've written a very simple test app which has a single publisher and subscriber. 

In my publisher I'm creating a buffer as below:


  message.rebuild(buffer, bufferSize, &freeMessageFunction, &myHint);
  socket.send(message);

When I start both the publisher and subscriber, I can see messages being sent and my logging shows that freeMessageFunction is being called (by the publisher) to free the buffer when ZeroMQ has finished with it. However, when I disconnect my subscriber, the publisher continues to try and send data (which is expected) but I can see that some buffers were not freed. Is this a bug? It does look like a memory leak.

In my app I only have a specific number of available buffers in and this will cause my pool to empty if the buffers are not freed.

Thanks.

Reply all
Reply to author
Forward
0 new messages