[ 
https://issues.apache.org/activemq/browse/AMQ-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47169#action_47169
 ] 

nnzz edited comment on AMQ-1997 at 11/7/08 7:38 AM:
----------------------------------------------------

Thanks for that. I did not realize the temp queues remain live until the 
connection is closed...

However, I am not clear of how I can delete the temp queues without closing the 
connection. I am using .Net (and therefore Apache.NMS.ActiveMQ), and I don't 
see any delete method in Apache.NMS.ActiveMQ.Commands.ActiveMQTempQueue (which 
is the runtime type returned when I create temp queue via the session), and  I 
also don't see any delete method in Apache.NMS.ITemporaryQueue interface.

I digged in the code a bit and found the following method: 
Apache.NMS.ActiveMQ.Connection.DisposeOf which deletes the temp queue when I 
pass Apache.NMS.ActiveMQ.Commands.ActiveMQTempQueue to it. However, it seems to 
kill the connection, as when I try to connect with the broker again right after 
I called disposeOf I am getting the following error: 

System.Exception: Error writing to broker.  Transport connection is closed.
  at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.Oneway(Command command) : 
Transport connection error: Error writing to broker.  Transport connection is 
closed.

Would you be able to advise us how we can delete temp queues without closing 
the connection.

Many thanks

N







      was (Author: nnzz):
    Thanks for that. I did not realize the temp queues remain live until the 
connection is closed...

However, I am not clear of how I can delete the temp queues without closing the 
connection. I am using .Net (and therefore Apache.NMS.ActiveMQ), and I don't 
see any delete method in Apache.NMS.ActiveMQ.Commands.ActiveMQTempQueue (which 
is the runtime type returned when I create temp queue via the session), and  I 
also don't see any delete method in Apache.NMS.ITemporaryQueue interface.

I digged in the code a bit and found the following method: 
Apache.NMS.ActiveMQ.Connection.DisposeOf which deletes the temp queue when I 
pass Apache.NMS.ActiveMQ.Commands.ActiveMQTempQueue to it. However, it seems to 
kill the connection, as I when I try to connect with the broker again right 
after I called disposeOf i am getting the following error: 

System.Exception: Error writing to broker.  Transport connection is closed.
  at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.Oneway(Command command) : 
Transport connection error: Error writing to broker.  Transport connection is 
closed.

Would you be able to advise us how we can delete temp queues without closing 
the connection.

Many thanks

N






  
>  Memory leak in broker - Temporary Queue related (relating to bug AMQ-1790)
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-1997
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1997
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.2.0
>         Environment: ActiveMQ broker 5.2
> Spring based application with synchronous messages (temp queue based) 
>            Reporter: NNZZ
>
> Hi there,
> I just installed ActiveMQ 5.2, especially for the fix of the memory leak 
> problem in broker, in version 5.1 (bug AMQ-1790), but the issue is still 
> occurring.
> After instantiating circa 1300 temp queues I am getting the following error: 
> java.lang.OutOfMemoryError : unable to create new native thread
> Also if I go to the web admin (http://localhost:8161/admin/topics.jsp) I can 
> see a long list of temp queues that don't go anywhere...
> Would you be able to advise us when the fix for this issue will be released.
> Many thanks
> N

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to