[rabbitmq-discuss] RabbitMQ C# .net client

Hubert Plociniczak hubert at lshift.net
Tue Aug 19 18:34:24 BST 2008


Hi Lakmali,

There is nothing special in the code.
Could it be the case that you set AutoClose property in connection to true ?

In that case when closing the channel with 'channel.Close(200, "Goodbye");'
this will automatically close the whole connection, because I assume that there are no
other channels left. Hence when you try to close the connection manually after it, 
you get this exception.

Does this help?

Thanks,
Hubert

Lakmali Weeraratne wrote:
>
> Hi Hubert,
>
> I was successful in creating a connection to the OpenAMQ Server.
>
> But when I’m closing the connection, it gives me an exception.
>
> Please be kind enough to point out the cause of the issue.
>
> Code Reference is attached.
>
> Regards,
>
> /Lakmali
>
> ----------------------------------------------------------------------------
>
> Private void closeConnection(object sender, EventArgs e)
>
> {
>
> try
>
> {
>
> channel.Close(200, "Goodbye");
>
> //conn.Close();
>
> }
>
> catch (RabbitMQ.Client.Exceptions.OperationInterruptedException)
>
> {
>
> MessageBox.Show ("Error");
>
> }
>
> }
>
> ------Error Description ------------------------------------------------
>
> On SimpleBlockingRpcContinuation class
>
> public virtual Command GetReply()
>
> {
>
> Either result = (Either)cell.Value;
>
> switch (result.Alternative) {
>
> case EitherAlternative.Left:
>
> return (Command)result.Value;
>
> case EitherAlternative.Right:
>
> throw new OperationInterruptedException((ShutdownEventArgs)result.Value);
>
> default:
>
> Trace.Fail("Illegal EitherAlternative " + result.Alternative);
>
> return null;
>
> }
>
> }
>
>
> Error at:
>
> throw new OperationInterruptedException((ShutdownEventArgs)result.Value);
>
> As
>
> " the AMQP operation was interrupted: AMQP close-reason, initiated by 
> Application, code=200, text="Goodbye", classId=0, methodId=0, cause= "
>
> ------Error Description ------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>   


-- 
 [][][] Hubert Plociniczak
   [][] LShift Ltd
 []  [] www.lshift.net





More information about the rabbitmq-discuss mailing list