<div dir="ltr">Thanks for the suggestion Michael. I checked at there is no sharing of the connection across the thread. The connection is all self contained to this method and this method is only invoked once on the thread. The odd thing is that this same client code used to work. It quit working when our rabbit mq server hyper-v image snapshot got rolled back and I had to re-install reconfigure rabbit mq. It makes me think I screwed up the server side configuration when reinstalling.<div>
<br></div><div><div>private void PublishMessage(byte[] message, Type messageType, string contentType, string messageId)</div><div> {</div><div> var factory = new ConnectionFactory() {VirtualHost = this.VirtualHost, HostName = this.Host, UserName = this.User, Password = this.Password };</div>
<div> using (var connection = factory.CreateConnection())</div><div> using (var channel = connection.CreateModel())</div><div> {</div><div> IBasicProperties props = channel.CreateBasicProperties();</div>
<div> props.SetPersistent(this.PersistMessages); </div><div> </div><div> //Mime time</div><div> props.ContentType = contentType;</div><div> props.Type = messageType.FullName;</div>
<div> props.MessageId = messageId;</div><div><br></div><div> //<a href="http://www.rabbitmq.com/tutorials/tutorial-three-dotnet.html">http://www.rabbitmq.com/tutorials/tutorial-three-dotnet.html</a></div>
<div> </div><div> //Note, may get AlreadyClosedException here if publishing to a incorrect exchange name</div><div> channel.BasicPublish(this.ExchangeName, this.RoutingKey, props, message);</div>
<div> }</div><div> }</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 9:04 PM, Michael Klishin <span dir="ltr"><<a href="mailto:mklishin@gopivotal.com" target="_blank">mklishin@gopivotal.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 19 June 2014 at 06:02:28, Scott McFadden (<a href="mailto:scott.kendall.mcfadden@gmail.com">scott.kendall.mcfadden@gmail.com</a>) wrote:<br>
> > =ERROR REPORT==== 18-Jun-2014(<a href="http://airmail.calendar/2014-06-18%2012:00:00%20GMT+4)::20:17:08" target="_blank">http://airmail.calendar/2014-06-18%2012:00:00%20GMT+4)::20:17:08</a><br>
> ===<br>
> AMQP connection <0.473.0> (running), channel 1 - error:<br>
> {amqp_error,unexpected_frame,<br>
> "expected content header for class 60, got non content header<br>
> frame instead",<br>
> 'basic.publish'}<br>
<br>
This looks like a well known issue you'll run into if you share a channel (IModel) between<br>
threads, in particular threads that publish messages. This is a connection-level error,<br>
so after getting it RabbitMQ closes the connection and your get socket errors on any subsequent<br>
operation in the client.<br>
<br>
Can the cross-thread sharing be the case? <br>
--<br>
MK<br>
<br>
Software Engineer, Pivotal/RabbitMQ<br>
</blockquote></div><br></div>