Temporary Topic not forwarding responses as expected

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Temporary Topic not forwarding responses as expected

kpoxmq
Setup: ActiveMQ 5.8.0, API: ctivemq-cpp-3.7.0 I have a 2-broker NOB setup, and configured duplex network connectors for topic "a.b.c" on broker1. A server process on broker1 publishes to the "a.b.c" using a Producer and specifies a ReplyTo destination which is a temporary topic created within the AMQ session using session->createTemporaryTopic(). It also creates a consumer listening on this temporary topic. A client on broker2 consumes messages from topic "a.b.c" using a Consumer and replies to the ReplyTo address using a Producer. This Reply message never makes it to the consumer listening to the temporary topic on broker1 when I use the configuration below on broker1: However, I notice that when I add a catch-all filter as shown below, the consumer on the temp topic sees the reply message: Why do I need a catch-all wildcard filter when bridgeTempDestinations is already set to true? If at all I must specify a filter, I need a filter for just temporary queues. I notice they are prefixed by the connection ID's, but it is nothing I can use a wildcard to select only on since it contains a colon.
Reply | Threaded
Open this post in threaded view
|

Re: Temporary Topic not forwarding responses as expected

ceposta
I don't see your configs or sample code, did you forget to add them?


On Mon, Jun 10, 2013 at 3:49 PM, kpoxmq <[hidden email]> wrote:

> Setup: ActiveMQ 5.8.0, API: ctivemq-cpp-3.7.0I have a 2-broker NOB setup,
> and
> configured duplex network connectors for topic "a.b.c" on broker1. A server
> process on broker1 publishes to the "a.b.c" using a Producer and specifies
> a
> ReplyTo destination which is a temporary topic created within the AMQ
> session using session->createTemporaryTopic(). It also creates a consumer
> listening on this temporary topic.A client on broker2 consumes messages
> from
> topic "a.b.c" using a Consumer and replies to the ReplyTo address using a
> Producer. This Reply message never makes it to the consumer listening to
> the
> temporary topic on broker1 when I use the configuration below on
> broker1:However, I notice that when I add a catch-all filter as shown
> below,
> the consumer on the temp topic sees the reply message:            " />
> Why do I need a catch-all wildcard filter when bridgeTempDestinations is
> already set to true? If at all I must specify a filter, I need a filter for
> just temporary queues. I notice they are prefixed by the connection ID's,
> but it is nothing I can use a wildcard to select only on since it contains
> a
> colon.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Temporary-Topic-not-forwarding-responses-as-expected-tp4668062.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.




--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Re: Temporary Topic not forwarding responses as expected

kpoxmq
In reply to this post by kpoxmq
This is the config at broker1:
...
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" brokerName="broker1" dataDirectory="${activemq.data}">
...
<networkConnector name="all" duplex="true" uri="static:(tcp://broker2:61616)" bridgeTempDestinations="true">
<dynamicallyIncludedDestinations>
<topic physicalName="a.b.c" />
</networkConnector>
...
</broker>
...
In my setup, a producer on broker1 sends a message to topic "a.b.c" specifying a replyTo which is a temporary topic created using session->createTemporaryTopic(). There is a consumer on broker1 consuming on the temporary topic destination.

Consumer on broker2 receives the messages on topic a.b.c. Producer on broker2 replies to the replyTo address specified in the message.

The message is NOT received by the consumer on broker1 listening on the temporary queue.
Reply | Threaded
Open this post in threaded view
|

javax.jms.JMSException: Cannot send message to queue://10408_base with invalid (null) producer state

DepestBlue
Dear all,


I'm using Acitvemq 5.6 with my app and struggling to handle the following Exception:
2013-06-13 09:53:46,018 | WARN  | Send failed for: ActiveMQObjectMessage {commandId = 6, responseRequired = false, messageId = ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination = queue://10408_base, transactionId = TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0, timestamp = 1371088670829, arrival = 0, brokerInTime = 1371088426003, brokerOutTime = 0, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties = org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false, readOnlyBody = false, droppable = fals
 e},  missing producer state for: org.apache.activemq.broker.ProducerBrokerExchange@c44470 | org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///10.1.100.66:64118
2013-06-13 09:53:46,018 | WARN  | Async error occurred: javax.jms.JMSException: Cannot send message to queue://10408_base with invalid (null) producer state | org.apache.activemq.broker.TransportConnection.Service | ActiveMQ Transport: tcp:///10.1.100.66:64118
javax.jms.JMSException: Cannot send message to queue://10408_base with invalid (null) producer state
at org.apache.activemq.broker.region.Queue.send(Queue.java:589)
at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
at java.lang.Thread.run(Thread.java:619)


Could anybody give me some clue? It would be much appreciated if any questions.


Thanks a lot,
Zhuran Li
Reply | Threaded
Open this post in threaded view
|

Re: javax.jms.JMSException: Cannot send message to queue://10408_base with invalid (null) producer state

ceposta
Would need to be able to re-create this... Please put together a unit test
that reproduces this.


On Fri, Jun 14, 2013 at 1:00 AM, lzr <[hidden email]> wrote:

> Dear all,
>
>
> I'm using Acitvemq 5.6 with my app and struggling to handle the following
> Exception:
> 2013-06-13 09:53:46,018 | WARN  | Send failed for: ActiveMQObjectMessage
> {commandId = 6, responseRequired = false, messageId =
> ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination = null,
> originalTransactionId = null, producerId =
> ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination =
> queue://10408_base, transactionId =
> TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0, timestamp =
> 1371088670829, arrival = 0, brokerInTime = 1371088426003, brokerOutTime =
> 0, correlationId = null, replyTo = null, persistent = true, type = null,
> priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null,
> compressed = false, userID = null, content =
> org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties =
> org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null,
> redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13
> 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false,
> readOnlyBody = false, droppable = fals
>  e},  missing producer state for:
> org.apache.activemq.broker.ProducerBrokerExchange@c44470 |
> org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///
> 10.1.100.66:64118
> 2013-06-13 09:53:46,018 | WARN  | Async error occurred:
> javax.jms.JMSException: Cannot send message to queue://10408_base with
> invalid (null) producer state |
> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
> Transport: tcp:///10.1.100.66:64118
> javax.jms.JMSException: Cannot send message to queue://10408_base with
> invalid (null) producer state
> at org.apache.activemq.broker.region.Queue.send(Queue.java:589)
> at
> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
> at
> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
> at
> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
> at
> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
> at
> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
> at
> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
> at
> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
> at
> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
> at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
> at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
> at
> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
> at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
> at
> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
> at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
> at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
> at java.lang.Thread.run(Thread.java:619)
>
>
> Could anybody give me some clue? It would be much appreciated if any
> questions.
>
>
> Thanks a lot,
> Zhuran Li




--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Thread leak in Activemq 5.6

DepestBlue
Dear all,


I found a thread leak issue during try activemq 5.6:
I create connection when sending message and close it once the sending finished.
Occassionally I restart activemq broker and found one thread generated with name "ActiveMQ Connection Executor...".
For deep research, I restarted the broker several times and same number thread generated; I attached the picture of my debug.
Could anybody give me some clues? I just want to know if this is a bug for ActiveMQ. The attachments includes my applications and the debugging pictures.


It would be much appreciated if you make any suggestion!!!


Thanks in advance,
Zhuran Li








At 2013-06-14 23:03:55,"Christian Posta" <[hidden email]> wrote:

>Would need to be able to re-create this... Please put together a unit test
>that reproduces this.
>
>
>On Fri, Jun 14, 2013 at 1:00 AM, lzr <[hidden email]> wrote:
>
>> Dear all,
>>
>>
>> I'm using Acitvemq 5.6 with my app and struggling to handle the following
>> Exception:
>> 2013-06-13 09:53:46,018 | WARN  | Send failed for: ActiveMQObjectMessage
>> {commandId = 6, responseRequired = false, messageId =
>> ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination = null,
>> originalTransactionId = null, producerId =
>> ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination =
>> queue://10408_base, transactionId =
>> TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0, timestamp =
>> 1371088670829, arrival = 0, brokerInTime = 1371088426003, brokerOutTime =
>> 0, correlationId = null, replyTo = null, persistent = true, type = null,
>> priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null,
>> compressed = false, userID = null, content =
>> org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties =
>> org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null,
>> redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13
>> 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false,
>> readOnlyBody = false, droppable = fals
>>  e},  missing producer state for:
>> org.apache.activemq.broker.ProducerBrokerExchange@c44470 |
>> org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///
>> 10.1.100.66:64118
>> 2013-06-13 09:53:46,018 | WARN  | Async error occurred:
>> javax.jms.JMSException: Cannot send message to queue://10408_base with
>> invalid (null) producer state |
>> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
>> Transport: tcp:///10.1.100.66:64118
>> javax.jms.JMSException: Cannot send message to queue://10408_base with
>> invalid (null) producer state
>> at org.apache.activemq.broker.region.Queue.send(Queue.java:589)
>> at
>> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
>> at
>> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
>> at
>> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
>> at
>> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
>> at
>> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
>> at
>> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
>> at
>> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
>> at
>> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
>> at
>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>> at
>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>> at
>> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>> at
>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>> at
>> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>> at
>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>> at
>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>> at
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>> at java.lang.Thread.run(Thread.java:619)
>>
>>
>> Could anybody give me some clue? It would be much appreciated if any
>> questions.
>>
>>
>> Thanks a lot,
>> Zhuran Li
>
>
>
>
>--
>*Christian Posta*
>http://www.christianposta.com/blog
>twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Re:Thread leak in Activemq 5.6

DepestBlue
Here comes the attachments.
At 2013-06-16 16:07:42,lzr <[hidden email]> wrote:
>Dear all,
>
>
>I found a thread leak issue during try activemq 5.6:
>I create connection when sending message and close it once the sending finished.
>Occassionally I restart activemq broker and found one thread generated with name "ActiveMQ Connection Executor...".
>For deep research, I restarted the broker several times and same number thread generated; I attached the picture of my debug.
>Could anybody give me some clues? I just want to know if this is a bug for ActiveMQ. The attachments includes my applications and the debugging pictures.
>
>
>It would be much appreciated if you make any suggestion!!!
>
>
>Thanks in advance,
>Zhuran Li
>
>
>
>
>
>
>
>
>At 2013-06-14 23:03:55,"Christian Posta" <[hidden email]> wrote:
>>Would need to be able to re-create this... Please put together a unit test
>>that reproduces this.
>>
>>
>>On Fri, Jun 14, 2013 at 1:00 AM, lzr <[hidden email]> wrote:
>>
>>> Dear all,
>>>
>>>
>>> I'm using Acitvemq 5.6 with my app and struggling to handle the following
>>> Exception:
>>> 2013-06-13 09:53:46,018 | WARN  | Send failed for: ActiveMQObjectMessage
>>> {commandId = 6, responseRequired = false, messageId =
>>> ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination = null,
>>> originalTransactionId = null, producerId =
>>> ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination =
>>> queue://10408_base, transactionId =
>>> TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0, timestamp =
>>> 1371088670829, arrival = 0, brokerInTime = 1371088426003, brokerOutTime =
>>> 0, correlationId = null, replyTo = null, persistent = true, type = null,
>>> priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null,
>>> compressed = false, userID = null, content =
>>> org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties =
>>> org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null,
>>> redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13
>>> 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false,
>>> readOnlyBody = false, droppable = fals
>>>  e},  missing producer state for:
>>> org.apache.activemq.broker.ProducerBrokerExchange@c44470 |
>>> org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///
>>> 10.1.100.66:64118
>>> 2013-06-13 09:53:46,018 | WARN  | Async error occurred:
>>> javax.jms.JMSException: Cannot send message to queue://10408_base with
>>> invalid (null) producer state |
>>> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
>>> Transport: tcp:///10.1.100.66:64118
>>> javax.jms.JMSException: Cannot send message to queue://10408_base with
>>> invalid (null) producer state
>>> at org.apache.activemq.broker.region.Queue.send(Queue.java:589)
>>> at
>>> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
>>> at
>>> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
>>> at
>>> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
>>> at
>>> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
>>> at
>>> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
>>> at
>>> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
>>> at
>>> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
>>> at
>>> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
>>> at
>>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>> at
>>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>> at
>>> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>> at
>>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>> at
>>> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>> at
>>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>> at
>>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>> at
>>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>> at java.lang.Thread.run(Thread.java:619)
>>>
>>>
>>> Could anybody give me some clue? It would be much appreciated if any
>>> questions.
>>>
>>>
>>> Thanks a lot,
>>> Zhuran Li
>>
>>
>>
>>
>>-- 
>>*Christian Posta*
>>http://www.christianposta.com/blog
>>twitter: @christianposta



SendRun.java (1K) Download Attachment
UFMQProcessor.java (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Thread leak in Activemq 5.6

ceposta
In reply to this post by DepestBlue
Yah, I can verify this is the case. Threads leak because the
threadpoolexecutor doesn't evict the threads. Checking for the best
solution to this.


On Sun, Jun 16, 2013 at 4:07 AM, lzr <[hidden email]> wrote:

> Dear all,
>
>
> I found a thread leak issue during try activemq 5.6:
> I create connection when sending message and close it once the sending
> finished.
> Occassionally I restart activemq broker and found one thread generated
> with name "ActiveMQ Connection Executor...".
> For deep research, I restarted the broker several times and same number
> thread generated; I attached the picture of my debug.
> Could anybody give me some clues? I just want to know if this is a bug for
> ActiveMQ. The attachments includes my applications and the debugging
> pictures.
>
>
> It would be much appreciated if you make any suggestion!!!
>
>
> Thanks in advance,
> Zhuran Li
>
>
>
>
>
>
>
>
> At 2013-06-14 23:03:55,"Christian Posta" <[hidden email]>
> wrote:
> >Would need to be able to re-create this... Please put together a unit test
> >that reproduces this.
> >
> >
> >On Fri, Jun 14, 2013 at 1:00 AM, lzr <[hidden email]> wrote:
> >
> >> Dear all,
> >>
> >>
> >> I'm using Acitvemq 5.6 with my app and struggling to handle the
> following
> >> Exception:
> >> 2013-06-13 09:53:46,018 | WARN  | Send failed for: ActiveMQObjectMessage
> >> {commandId = 6, responseRequired = false, messageId =
> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination =
> null,
> >> originalTransactionId = null, producerId =
> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination =
> >> queue://10408_base, transactionId =
> >> TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0,
> timestamp =
> >> 1371088670829, arrival = 0, brokerInTime = 1371088426003, brokerOutTime
> =
> >> 0, correlationId = null, replyTo = null, persistent = true, type = null,
> >> priority = 4, groupID = null, groupSequence = 0, targetConsumerId =
> null,
> >> compressed = false, userID = null, content =
> >> org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties =
> >> org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null,
> >> redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13
> >> 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false,
> >> readOnlyBody = false, droppable = fals
> >>  e},  missing producer state for:
> >> org.apache.activemq.broker.ProducerBrokerExchange@c44470 |
> >> org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///
> >> 10.1.100.66:64118
> >> 2013-06-13 09:53:46,018 | WARN  | Async error occurred:
> >> javax.jms.JMSException: Cannot send message to queue://10408_base with
> >> invalid (null) producer state |
> >> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
> >> Transport: tcp:///10.1.100.66:64118
> >> javax.jms.JMSException: Cannot send message to queue://10408_base with
> >> invalid (null) producer state
> >> at org.apache.activemq.broker.region.Queue.send(Queue.java:589)
> >> at
> >>
> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
> >> at
> >>
> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
> >> at
> >>
> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
> >> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
> >> at
> >>
> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
> >> at
> >>
> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
> >> at
> >>
> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
> >> at
> >>
> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
> >> at
> >>
> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
> >> at
> >>
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
> >> at
> >>
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
> >> at
> >>
> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
> >> at
> >>
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
> >> at
> >>
> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
> >> at
> >>
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> >> at
> >>
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
> >> at
> >>
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
> >> at java.lang.Thread.run(Thread.java:619)
> >>
> >>
> >> Could anybody give me some clue? It would be much appreciated if any
> >> questions.
> >>
> >>
> >> Thanks a lot,
> >> Zhuran Li
> >
> >
> >
> >
> >--
> >*Christian Posta*
> >http://www.christianposta.com/blog
> >twitter: @christianposta
>



--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Re: Thread leak in Activemq 5.6

ceposta
I've opened a JIRA here: https://issues.apache.org/jira/browse/AMQ-4586

The workaround for your case is to use the failover transport and you won't
see the executor threads leaked.


On Mon, Jun 17, 2013 at 11:23 AM, Christian Posta <[hidden email]
> wrote:

> Yah, I can verify this is the case. Threads leak because the
> threadpoolexecutor doesn't evict the threads. Checking for the best
> solution to this.
>
>
> On Sun, Jun 16, 2013 at 4:07 AM, lzr <[hidden email]> wrote:
>
>> Dear all,
>>
>>
>> I found a thread leak issue during try activemq 5.6:
>> I create connection when sending message and close it once the sending
>> finished.
>> Occassionally I restart activemq broker and found one thread generated
>> with name "ActiveMQ Connection Executor...".
>> For deep research, I restarted the broker several times and same number
>> thread generated; I attached the picture of my debug.
>> Could anybody give me some clues? I just want to know if this is a bug
>> for ActiveMQ. The attachments includes my applications and the debugging
>> pictures.
>>
>>
>> It would be much appreciated if you make any suggestion!!!
>>
>>
>> Thanks in advance,
>> Zhuran Li
>>
>>
>>
>>
>>
>>
>>
>>
>> At 2013-06-14 23:03:55,"Christian Posta" <[hidden email]>
>> wrote:
>> >Would need to be able to re-create this... Please put together a unit
>> test
>> >that reproduces this.
>> >
>> >
>> >On Fri, Jun 14, 2013 at 1:00 AM, lzr <[hidden email]> wrote:
>> >
>> >> Dear all,
>> >>
>> >>
>> >> I'm using Acitvemq 5.6 with my app and struggling to handle the
>> following
>> >> Exception:
>> >> 2013-06-13 09:53:46,018 | WARN  | Send failed for:
>> ActiveMQObjectMessage
>> >> {commandId = 6, responseRequired = false, messageId =
>> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination =
>> null,
>> >> originalTransactionId = null, producerId =
>> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination =
>> >> queue://10408_base, transactionId =
>> >> TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0,
>> timestamp =
>> >> 1371088670829, arrival = 0, brokerInTime = 1371088426003,
>> brokerOutTime =
>> >> 0, correlationId = null, replyTo = null, persistent = true, type =
>> null,
>> >> priority = 4, groupID = null, groupSequence = 0, targetConsumerId =
>> null,
>> >> compressed = false, userID = null, content =
>> >> org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties =
>> >> org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null,
>> >> redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13
>> >> 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false,
>> >> readOnlyBody = false, droppable = fals
>> >>  e},  missing producer state for:
>> >> org.apache.activemq.broker.ProducerBrokerExchange@c44470 |
>> >> org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///
>> >> 10.1.100.66:64118
>> >> 2013-06-13 09:53:46,018 | WARN  | Async error occurred:
>> >> javax.jms.JMSException: Cannot send message to queue://10408_base with
>> >> invalid (null) producer state |
>> >> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
>> >> Transport: tcp:///10.1.100.66:64118
>> >> javax.jms.JMSException: Cannot send message to queue://10408_base with
>> >> invalid (null) producer state
>> >> at org.apache.activemq.broker.region.Queue.send(Queue.java:589)
>> >> at
>> >>
>> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
>> >> at
>> >>
>> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
>> >> at
>> >>
>> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>> >> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
>> >> at
>> >>
>> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
>> >> at
>> >>
>> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
>> >> at
>> >>
>> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
>> >> at
>> >>
>> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
>> >> at
>> >>
>> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
>> >> at
>> >>
>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>> >> at
>> >>
>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>> >> at
>> >>
>> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>> >> at
>> >>
>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>> >> at
>> >>
>> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>> >> at
>> >>
>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>> >> at
>> >>
>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>> >> at
>> >>
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>> >> at java.lang.Thread.run(Thread.java:619)
>> >>
>> >>
>> >> Could anybody give me some clue? It would be much appreciated if any
>> >> questions.
>> >>
>> >>
>> >> Thanks a lot,
>> >> Zhuran Li
>> >
>> >
>> >
>> >
>> >--
>> >*Christian Posta*
>> >http://www.christianposta.com/blog
>> >twitter: @christianposta
>>
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta
>



--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Re: Thread leak in Activemq 5.6

ceposta
I've closed the Jira, this is not an issue. You can take a look at the test
cases to see why. They're adapted from your orignal tests.

Cheers


On Mon, Jun 17, 2013 at 3:35 PM, Christian Posta
<[hidden email]>wrote:

> I've opened a JIRA here: https://issues.apache.org/jira/browse/AMQ-4586
>
> The workaround for your case is to use the failover transport and you
> won't see the executor threads leaked.
>
>
> On Mon, Jun 17, 2013 at 11:23 AM, Christian Posta <
> [hidden email]> wrote:
>
>> Yah, I can verify this is the case. Threads leak because the
>> threadpoolexecutor doesn't evict the threads. Checking for the best
>> solution to this.
>>
>>
>> On Sun, Jun 16, 2013 at 4:07 AM, lzr <[hidden email]> wrote:
>>
>>> Dear all,
>>>
>>>
>>> I found a thread leak issue during try activemq 5.6:
>>> I create connection when sending message and close it once the sending
>>> finished.
>>> Occassionally I restart activemq broker and found one thread generated
>>> with name "ActiveMQ Connection Executor...".
>>> For deep research, I restarted the broker several times and same number
>>> thread generated; I attached the picture of my debug.
>>> Could anybody give me some clues? I just want to know if this is a bug
>>> for ActiveMQ. The attachments includes my applications and the debugging
>>> pictures.
>>>
>>>
>>> It would be much appreciated if you make any suggestion!!!
>>>
>>>
>>> Thanks in advance,
>>> Zhuran Li
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> At 2013-06-14 23:03:55,"Christian Posta" <[hidden email]>
>>> wrote:
>>> >Would need to be able to re-create this... Please put together a unit
>>> test
>>> >that reproduces this.
>>> >
>>> >
>>> >On Fri, Jun 14, 2013 at 1:00 AM, lzr <[hidden email]> wrote:
>>> >
>>> >> Dear all,
>>> >>
>>> >>
>>> >> I'm using Acitvemq 5.6 with my app and struggling to handle the
>>> following
>>> >> Exception:
>>> >> 2013-06-13 09:53:46,018 | WARN  | Send failed for:
>>> ActiveMQObjectMessage
>>> >> {commandId = 6, responseRequired = false, messageId =
>>> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination =
>>> null,
>>> >> originalTransactionId = null, producerId =
>>> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination =
>>> >> queue://10408_base, transactionId =
>>> >> TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0,
>>> timestamp =
>>> >> 1371088670829, arrival = 0, brokerInTime = 1371088426003,
>>> brokerOutTime =
>>> >> 0, correlationId = null, replyTo = null, persistent = true, type =
>>> null,
>>> >> priority = 4, groupID = null, groupSequence = 0, targetConsumerId =
>>> null,
>>> >> compressed = false, userID = null, content =
>>> >> org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties =
>>> >> org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null,
>>> >> redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13
>>> >> 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false,
>>> >> readOnlyBody = false, droppable = fals
>>> >>  e},  missing producer state for:
>>> >> org.apache.activemq.broker.ProducerBrokerExchange@c44470 |
>>> >> org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///
>>> >> 10.1.100.66:64118
>>> >> 2013-06-13 09:53:46,018 | WARN  | Async error occurred:
>>> >> javax.jms.JMSException: Cannot send message to queue://10408_base with
>>> >> invalid (null) producer state |
>>> >> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
>>> >> Transport: tcp:///10.1.100.66:64118
>>> >> javax.jms.JMSException: Cannot send message to queue://10408_base with
>>> >> invalid (null) producer state
>>> >> at org.apache.activemq.broker.region.Queue.send(Queue.java:589)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>>> >> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
>>> >> at
>>> >>
>>> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>>> >> at
>>> >>
>>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>>> >> at
>>> >>
>>> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>>> >> at
>>> >>
>>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>>> >> at
>>> >>
>>> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>>> >> at
>>> >>
>>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>> >> at
>>> >>
>>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>>> >> at
>>> >>
>>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>>> >> at java.lang.Thread.run(Thread.java:619)
>>> >>
>>> >>
>>> >> Could anybody give me some clue? It would be much appreciated if any
>>> >> questions.
>>> >>
>>> >>
>>> >> Thanks a lot,
>>> >> Zhuran Li
>>> >
>>> >
>>> >
>>> >
>>> >--
>>> >*Christian Posta*
>>> >http://www.christianposta.com/blog
>>> >twitter: @christianposta
>>>
>>
>>
>>
>> --
>> *Christian Posta*
>> http://www.christianposta.com/blog
>> twitter: @christianposta
>>
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta
>



--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
Reply | Threaded
Open this post in threaded view
|

Re:Re: Thread leak in Activemq 5.6

DepestBlue
In reply to this post by ceposta
Thanks a lot for the checking. Please kindly let me know if any updates.



At 2013-06-17 23:23:24,"Christian Posta" <[hidden email]> wrote:

>Yah, I can verify this is the case. Threads leak because the
>threadpoolexecutor doesn't evict the threads. Checking for the best
>solution to this.
>
>
>On Sun, Jun 16, 2013 at 4:07 AM, lzr <[hidden email]> wrote:
>
>> Dear all,
>>
>>
>> I found a thread leak issue during try activemq 5.6:
>> I create connection when sending message and close it once the sending
>> finished.
>> Occassionally I restart activemq broker and found one thread generated
>> with name "ActiveMQ Connection Executor...".
>> For deep research, I restarted the broker several times and same number
>> thread generated; I attached the picture of my debug.
>> Could anybody give me some clues? I just want to know if this is a bug for
>> ActiveMQ. The attachments includes my applications and the debugging
>> pictures.
>>
>>
>> It would be much appreciated if you make any suggestion!!!
>>
>>
>> Thanks in advance,
>> Zhuran Li
>>
>>
>>
>>
>>
>>
>>
>>
>> At 2013-06-14 23:03:55,"Christian Posta" <[hidden email]>
>> wrote:
>> >Would need to be able to re-create this... Please put together a unit test
>> >that reproduces this.
>> >
>> >
>> >On Fri, Jun 14, 2013 at 1:00 AM, lzr <[hidden email]> wrote:
>> >
>> >> Dear all,
>> >>
>> >>
>> >> I'm using Acitvemq 5.6 with my app and struggling to handle the
>> following
>> >> Exception:
>> >> 2013-06-13 09:53:46,018 | WARN  | Send failed for: ActiveMQObjectMessage
>> >> {commandId = 6, responseRequired = false, messageId =
>> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1:1, originalDestination =
>> null,
>> >> originalTransactionId = null, producerId =
>> >> ID:nfsnnc02-46547-1370842535042-0:547519:1:1, destination =
>> >> queue://10408_base, transactionId =
>> >> TX:ID:nfsnnc02-46547-1370842535042-0:547519:1, expiration = 0,
>> timestamp =
>> >> 1371088670829, arrival = 0, brokerInTime = 1371088426003, brokerOutTime
>> =
>> >> 0, correlationId = null, replyTo = null, persistent = true, type = null,
>> >> priority = 4, groupID = null, groupSequence = 0, targetConsumerId =
>> null,
>> >> compressed = false, userID = null, content =
>> >> org.apache.activemq.util.ByteSequence@c4b67b, marshalledProperties =
>> >> org.apache.activemq.util.ByteSequence@a84ac2, dataStructure = null,
>> >> redeliveryCounter = 0, size = 0, properties = {createtime=2013-06-13
>> >> 09:57:50, datasize=1, syncflag=bd_defdoc}, readOnlyProperties = false,
>> >> readOnlyBody = false, droppable = fals
>> >>  e},  missing producer state for:
>> >> org.apache.activemq.broker.ProducerBrokerExchange@c44470 |
>> >> org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///
>> >> 10.1.100.66:64118
>> >> 2013-06-13 09:53:46,018 | WARN  | Async error occurred:
>> >> javax.jms.JMSException: Cannot send message to queue://10408_base with
>> >> invalid (null) producer state |
>> >> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ
>> >> Transport: tcp:///10.1.100.66:64118
>> >> javax.jms.JMSException: Cannot send message to queue://10408_base with
>> >> invalid (null) producer state
>> >> at org.apache.activemq.broker.region.Queue.send(Queue.java:589)
>> >> at
>> >>
>> org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
>> >> at
>> >>
>> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
>> >> at
>> >>
>> org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
>> >> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
>> >> at
>> >>
>> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
>> >> at
>> >>
>> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
>> >> at
>> >>
>> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
>> >> at
>> >>
>> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
>> >> at
>> >>
>> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
>> >> at
>> >>
>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
>> >> at
>> >>
>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
>> >> at
>> >>
>> org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
>> >> at
>> >>
>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
>> >> at
>> >>
>> org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229)
>> >> at
>> >>
>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>> >> at
>> >>
>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222)
>> >> at
>> >>
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204)
>> >> at java.lang.Thread.run(Thread.java:619)
>> >>
>> >>
>> >> Could anybody give me some clue? It would be much appreciated if any
>> >> questions.
>> >>
>> >>
>> >> Thanks a lot,
>> >> Zhuran Li
>> >
>> >
>> >
>> >
>> >--
>> >*Christian Posta*
>> >http://www.christianposta.com/blog
>> >twitter: @christianposta
>>
>
>
>
>--
>*Christian Posta*
>http://www.christianposta.com/blog
>twitter: @christianposta