You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by undecided <co...@point72.com> on 2015/11/11 15:55:35 UTC

System.IO.EndOfStreamException when closing connection in NMS

Connecting like this
        amqStuff = new AMQStuff();
         amqStuff._factory = new
ConnectionFactory("failover:(tcp://127.0.0.1:61616)");
         amqStuff._connection = amqStuff._factory.CreateConnection("admin",
"admin");
         amqStuff._session = amqStuff._connection.CreateSession();
         amqStuff._topic = amqStuff._session.GetTopic("TEST");
         amqStuff._consumer =
amqStuff._session.CreateConsumer(amqStuff._topic);

Closing like this:
if (amqStuff != null)
         {
             amqStuff._consumer.Close();
             amqStuff._session.Close();
             amqStuff._connection.Stop();
             amqStuff._connection.Close();
             amqStuff = null;
         }

The exception is thrown at the _connection.Close()

This is with the default windows installation. I see the connection come and
go on the web console.
Thanks





--
View this message in context: http://activemq.2283324.n4.nabble.com/System-IO-EndOfStreamException-when-closing-connection-in-NMS-tp4703853.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: System.IO.EndOfStreamException when closing connection in NMS

Posted by undecided <co...@point72.com>.
Interestingly enough, when I replaced the failover transport with just tcp:\\
The exception type changed to System.IO.IOException.



--
View this message in context: http://activemq.2283324.n4.nabble.com/System-IO-EndOfStreamException-when-closing-connection-in-NMS-tp4703853p4703861.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: System.IO.EndOfStreamException when closing connection in NMS

Posted by undecided <co...@point72.com>.
Thx, I forgot to attach that. I am using latest version of both
NMS/NMS.ActiveMQ (1.7.1) and AMQ (5.12.1).



--
View this message in context: http://activemq.2283324.n4.nabble.com/System-IO-EndOfStreamException-when-closing-connection-in-NMS-tp4703853p4703858.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: System.IO.EndOfStreamException when closing connection in NMS

Posted by Timothy Bish <ta...@gmail.com>.
On 11/11/2015 09:55 AM, undecided wrote:
> Connecting like this
>         amqStuff = new AMQStuff();
>          amqStuff._factory = new
> ConnectionFactory("failover:(tcp://127.0.0.1:61616)");
>          amqStuff._connection = amqStuff._factory.CreateConnection("admin",
> "admin");
>          amqStuff._session = amqStuff._connection.CreateSession();
>          amqStuff._topic = amqStuff._session.GetTopic("TEST");
>          amqStuff._consumer =
> amqStuff._session.CreateConsumer(amqStuff._topic);
>
> Closing like this:
> if (amqStuff != null)
>          {
>              amqStuff._consumer.Close();
>              amqStuff._session.Close();
>              amqStuff._connection.Stop();
>              amqStuff._connection.Close();
>              amqStuff = null;
>          }
>
> The exception is thrown at the _connection.Close()
>
> This is with the default windows installation. I see the connection come and
> go on the web console.
> Thanks
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/System-IO-EndOfStreamException-when-closing-connection-in-NMS-tp4703853.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
Always a good idea to share the versions you are working with.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/