[rabbitmq-discuss] ExchangeUnbind Fails with .NET RabbitMQ.Client

Chris Patterson chris at phatboyg.com
Tue May 10 22:29:11 BST 2011


First, I'm running 2.4.1 on Windows and testing using the .NET
RabbitMQ Client.

Here is the code I'm testing to verify the behavior:

	[When]
	public void An_exchange_is_bound_to_a_queue()
	{
		Model.ExchangeDeclare("TheSource", ExchangeType.Fanout, true, true,
null);
		Model.ExchangeDeclare("TheDestination", ExchangeType.Fanout, true,
true, null);
		Model.QueueDeclare("TheQueue", true, true, true, null);
		Model.QueueBind("TheQueue", "TheDestination", "");

		Model.ExchangeBind("TheDestination", "TheSource", "");
	}

	[Then]
	public void Should_be_able_to_unbind_the_exchanges()
	{
		Model.ExchangeUnbind("TheDestination", "TheSource", "");
	}

The error message displayed is:

RabbitMQ.Client.Exceptions.OperationInterruptedException : The AMQP
operation was interrupted: AMQP close-reason, initiated by Library,
code=540, text="The Class or Method <40.51> is unknown", classId=0,
methodId=0, cause=RabbitMQ.Client.Impl.UnknownClassOrMethodException:
The Class or Method <40.51> is unknown
   at
RabbitMQ.Client.Framing.v0_9_1.Protocol.DecodeMethodFrom(NetworkBinaryReader
reader)
   at RabbitMQ.Client.Impl.CommandAssembler.HandleFrame(Frame f)
   at RabbitMQ.Client.Impl.Session.HandleFrame(Frame frame)
   at RabbitMQ.Client.Impl.ConnectionBase.MainLoopIteration()
   at RabbitMQ.Client.Impl.ConnectionBase.MainLoop()<40.51>
	at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply()
	at RabbitMQ.Client.Impl.ModelBase.ModelRpc(MethodBase method,
ContentHeaderBase header, Byte[] body)
	at
RabbitMQ.Client.Framing.Impl.v0_9_1.Model._Private_ExchangeUnbind(String
destination, String source, String routingKey, Boolean nowait,
IDictionary arguments)
	at RabbitMQ.Client.Impl.ModelBase.ExchangeUnbind(String destination,
String source, String routingKey)

This seems like a protocol version issue to me in talking with the
server (and ExchangeUnbind does seem to be a RabbitMQ specific method)
but I'm curious how I can enable this method in the protocol so I can
call it?


More information about the rabbitmq-discuss mailing list