Hi,
I'm playing with NetMQ for a couple of days, and I really like it. You guys did an awesome job, so I decided to use it in our project (Dealer - Router pattern).
However, I have a question... I'm going to send multipart messages over the network between servers. Each message will consists of several frames;
1. Client Address (default)
2. Empty String (default)
3. Message Metadata (json string/byte[])
4. Message Payload
After send (Dealer), what I do in my app (on Router side) is, I read frame by frame using ReceiveFrameBytes: read Address (1), empty frame, then Message Metadata (point 3).
Based on the Metadata (point 3) - we perform validation. If validation fails, we DO NOT WANT TO LOAD LAST FRAME - Message Payload (I use SkipMultipartMessage method for that).
BUT... despite of fact that message is rejected/skipped, I see in Visual Studio Diagnostic Tool that the frame with Payload is loaded right after first ReceiveFrameBytes is called.
This is something which we can't accept (since when we have for instance: 10 x 5 MB Payloads, and Validation Engine (for example max allowed size is exceeded or Message Type is wrong) force the system to reject payloads - the MemoryUsage of my app is increasing anyway.
Is there any option to workaround that? To load messages frame by frame instead of reading entire message at a time?
I use latest NetMQ: NetMQ 4.0.0.1
Any help would be very appreciated
Thanks in advance,
Marcin