Questions tagged [netmq]

A native .NET library for ZeroMQ messaging.

NetMQ is a 100% C# implementation of ZeroMQ for the .NET platform.

It provides a low overhead messaging solution for high performance applications over a variety of transports.

163 questions
18
votes
2 answers

ZeroMQ PUB/SUB Pattern with Multi-Threaded Poller Cancellation

I have two applications, a C++ server, and a C# WPF UI. The C++ code takes requests (from anywhere/anyone) via a ZeroMQ messaging [PUB/SUB] service. I use my C# code for back testing and to create "back tests" and execute them. These back tests can…
MoonKnight
  • 23,214
  • 40
  • 145
  • 277
7
votes
1 answer

Zeromq which socket should bind on PubSub pattern

I have been reading about ZeroMQ more specifically about NetMQ and almost every Pub/Sub examples I saw used to Bind the Publisher socket and then the Subscriber socket connects to the other. So i'm wondering if it is possible to do the reverse, i…
mmarques
  • 625
  • 3
  • 9
  • 27
7
votes
3 answers

What is the proper way to wait for connections?

I am trying to implement a simple message passing between two applications using NetMQ (a slightly more elaborate description of what I am trying to achieve is below). After a bit of trial and error I've found that I can't just send or receive…
orom
  • 851
  • 1
  • 10
  • 22
6
votes
2 answers

NetMQ vs clrzmq

Months ago I was selecting .NET library to use for implementing ZeroMQ communication, and I was pretty confused with the fact that there are few libraries suggested at zeromq.org. Meanwhile I've learned few things, so I'll share here. Someone may…
Aleksandar Pesic
  • 668
  • 7
  • 18
5
votes
1 answer

NetMQ Unhandled Exception Best Practices

I'm using NetMQ for client/server comms for a pricing system using Pub/Sub for price data and Req/Res for C&C. It's working very well except that I'm seeing random and unreproducible exceptions occurring in the bowels of the NetMQ library. I'm…
SteveH
  • 343
  • 2
  • 10
5
votes
1 answer

How to correctly use NetMq Poller for Receiving data

I have been given the task to create a interface where I receive data through socket from the sender, for this purpose I am using NetMQ PushSocket for the sender side and then I receive the data at client side sung PullSocket and I have to update…
user167124
  • 349
  • 2
  • 13
4
votes
1 answer

Why doesn't NetMQ work in an NUnit environment

I've created a Gist with my NetMQ implementation as I feel it a bit much to paste here: https://gist.github.com/gthvidsten/e626d7e6c51012b1ba152d22e034d93d If I do the following in a .Net Core console app, everything works fine and I receive the…
TheHvidsten
  • 4,028
  • 3
  • 29
  • 62
4
votes
0 answers

Proper way of taking items out of NetMQQueue / synchronizing messages

If you are using multiple threads to send data over a socket, it is recommended to use NetMQQueue to synchronize these requests. I've attached the queue to a poller and I'm receiving queue.ReceiveReady events. But in this event I get access to the…
dwonisch
  • 5,595
  • 2
  • 30
  • 43
4
votes
1 answer

Documenting a message bus API?

I've been searching for the past couple of days for some way to document the API for a microservices architecture I'm working on. First, I'll give a very quick description of the project: Written in C#, .NET 4.6.1 Using NetMQ with x-pub/x-sub…
user1094821
  • 1,495
  • 1
  • 11
  • 10
4
votes
1 answer

System.ArgumentNullException with NetMQ.Msg.Put()

I'm using NetMQ for inter-process data communication. I'm using the NuGet package version 3.3.2.2 on .Net 4.5 I want to create a simple message from a string and send it over a RequestSocket. I keep getting System.ArgumentNullException although…
David Haim
  • 25,446
  • 3
  • 44
  • 78
4
votes
2 answers

NetMq sockets are thread safe?

I use private field (PushSocket - zmq_push socket for netmq) private PushSocket _pushSocket; And two methods which use this socket in different threads public void Method1() { //.....// _pushSocket.SendFrame(....); //.....// } public…
Evgeniy Mironov
  • 777
  • 6
  • 22
4
votes
2 answers

PUB/SUB can I .connect() before I .bind()?

I'm using a PUB/SUB design and my question is: Can I .bind() to a port after another socket has .connect()-ed to it, or should I .bind() before another socket tries to .connect() to the same address? In other words: Does the order of .bind() and…
barakcaf
  • 1,294
  • 2
  • 16
  • 27
3
votes
1 answer

How to check ZMQ publisher is alive or not in c#

I am using ZMQ NetMQ package in c# to receive the message from the subscriber. I am able to receive the msg but I am sticking in the while loop. I want to break the while loop if the publisher is stopped sending data. Here is my subscriber…
3
votes
0 answers

NetMQ - TLS / SSL implementation for XPub / XSub pattern

I'm trying to implement TLS in XPub / XSub pattern example, the example was taken from https://netmq.readthedocs.io/en/latest/xpub-xsub/ I tried to use NetMQCertificate for CURVE…
3
votes
0 answers

NetMQ close connection of peer using ROUTER socket

I am trying to implement a load balancing message broker using NetMQ and the Paranoid Pirate Pattern. The client communicates with the message broker via TCP over the Internet, which is why I want to implement a transport encryption and an…
D. Kaiser
  • 159
  • 1
  • 9
1
2 3
10 11