On 13 August 2014 at 06:29:39, kevin chandler (
kevin.ch...@gmail.com) wrote:
> > After some thought, I considered this might be a case of .Net
> and the unmanaged Rabbit software not sharing memory pointers
> correctly.
What is that "unmanaged Rabbit software"?
> Maybe the Garbage Collection is freeing some of the
> pointers before the unmanged code is done with them. I decided
> to just keep my message body's byte[] data that I passed to BasicPublish
> around in a List to prevent the garbage collector from
> freeing that memory. This worked. Multiple runs without a single
> failure..
This is quite interesting and I don't think I've seen this with any other
client. 5000 messages a second is not a lot, by the way.
> 1. What does the ampq attribute class around the Private BasicPublish
> do?
Do you mean _Private_BasicPublish in the generated protocol serialisation
code or BasicPublish in IModel?
The latter is used by our codegen tool to generate methods that serialise
and deserialise protocol methods. Those attributes don't have anything
to do with memory management and are not used at runtime, only when
the client is built.
> 2. Have others encountered this problem?
I personally have never seen it reported.
> 3. If so, how did you work around preventing the GC from freeing
> your data prior to the unmanaged Rabbit code completing its tasks?
Again, what is the "unmanaged Rabbit code"? RabbitMQ .NET client is pure C#.
--
MK
Staff Software Engineer, Pivotal/RabbitMQ