When using publisher confirms with the C# code, there is a bug in the client when experiencing any significant load. The offending code is in the client "RabbitMQ.Client.Impl.ModelBase" class in the "BasicPublish" method. <div><br></div><div><div> if (m_nextPubSeqNo > 0) {</div><div> m_unconfirmedSet.<b>Add</b>(m_nextPubSeqNo, null);</div><div> m_nextPubSeqNo++;</div><div> }</div><div><br></div><div>It looks like there are multiple threads hitting the bolded "<b>Add</b>" method before the sequence number is incremented in the next line leading to duplicate key exceptions being thrown by the "m_unconfirmedSet" sorted list. This code either needs to have a lock around it or have m_nextPubSeqNo change to a long so that "Interlocked.Increment" can be used in the assignment.</div><div><br></div><div><br></div><div><div><br></div></div></div>