activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bill richard <billrich...@126.com>
Subject Re: unsubscribe unsuccess!!
Date Wed, 02 Jan 2008 08:08:05 GMT

Thanks!
 i modified the org.apache.activemq.store.kahadaptor.KahaTopicReferenceStore
removeSubscriberMessageContainer(String clientId,
			String subscriptionName) throws IOException 
to
protected void removeSubscriberMessageContainer(String clientId,
			String subscriptionName) throws IOException {
		String subscriberKey = getSubscriptionKey(clientId, subscriptionName);
		String containerName = getSubscriptionContainerName(subscriberKey);
		subscriberContainer.remove(subscriberKey);
		TopicSubContainer container = subscriberMessages.remove(subscriberKey);
		if (container != null){
			for (Iterator i = container.iterator(); i.hasNext();) {
				ConsumerMessageRef ref = (ConsumerMessageRef) i.next();
				if (ref != null) {
					TopicSubAck tsa = ackContainer.get(ref.getAckEntry());
					if (tsa != null) {
						if (tsa.decrementCount() <= 0) {
							ackContainer.remove(ref.getAckEntry());
							messageContainer.remove(tsa.getMessageEntry());
						} else {
							ackContainer.update(ref.getAckEntry(), tsa);
						}
					}
				}
			}
		}
		store.deleteMapContainer(containerName);
	}

it seems work for me!
And i also reported this:
https://issues.apache.org/activemq/browse/AMQ-1533


rajdavies wrote:
> 
> Hi Bill,
> 
> this is obviously a bug - could raise an issue on
> http://issues.apache.org/activemq/browse/AMQ
> 
> thanks,
> 
> Rob
> 
> On Jan 2, 2008, at 2:27 AM, bill richard wrote:
> 
>>
>> can anyone give me some hint?why this exception was thrown?
>>
>>
>> bill richard wrote:
>>>
>>> [gos@cngrid0 msgclient]$ javax.jms.JMSException:
>>> java.lang.NullPointerException
>>>        at
>>> org
>>> .apache
>>> .activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java: 
>>> 49)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java: 
>>> 1178)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.ActiveMQConnection.unsubscribe(ActiveMQConnection.java: 
>>> 1921)
>>>        at
>>> org 
>>> .apache.activemq.ActiveMQSession.unsubscribe(ActiveMQSession.java: 
>>> 1417)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .ActiveMQTopicSession.unsubscribe(ActiveMQTopicSession.java:380)
>>>        at
>>> org 
>>> .gos.common.msg.controller.MessageConsumerWrapper.unSubScribe(Unknown
>>> Source)
>>>        at org.gos.system.msg.helpper.UnsubMessage.unSubscribe(Unknown
>>> Source)
>>>        at org.gos.system.msg.helpper.UnsubMessage.main(Unknown  
>>> Source)
>>> Caused by: java.lang.NullPointerException
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .store 
>>> .kahadaptor 
>>> .KahaTopicReferenceStore 
>>> .removeSubscriberMessageContainer(KahaTopicReferenceStore.java:304)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .store 
>>> .kahadaptor 
>>> .KahaTopicReferenceStore 
>>> .deleteSubscription(KahaTopicReferenceStore.java:217)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .store 
>>> .amq 
>>> .AMQTopicMessageStore.deleteSubscription(AMQTopicMessageStore.java: 
>>> 178)
>>>        at
>>> org 
>>> .apache.activemq.broker.region.Topic.deleteSubscription(Topic.java: 
>>> 179)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker.region.TopicRegion.removeSubscription(TopicRegion.java:137)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker.region.RegionBroker.removeSubscription(RegionBroker.java:372)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.java: 
>>> 97)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.java: 
>>> 97)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.java: 
>>> 97)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker 
>>> .MutableBrokerFilter.removeSubscription(MutableBrokerFilter.java:107)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker 
>>> .TransportConnection 
>>> .processRemoveSubscription(TransportConnection.java:315)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .command.RemoveSubscriptionInfo.visit(RemoveSubscriptionInfo.java:83)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker.TransportConnection.service(TransportConnection.java:281)
>>>        at
>>> org.apache.activemq.broker.TransportConnection 
>>> $1.onCommand(TransportConnection.java:178)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.transport.TransportFilter.onCommand(TransportFilter.java: 
>>> 67)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java: 
>>> 134)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .transport.InactivityMonitor.onCommand(InactivityMonitor.java:138)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>        at
>>> org 
>>> .apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java: 
>>> 185)
>>>        at
>>> org 
>>> .apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java: 
>>> 172)
>>>        at java.lang.Thread.run(Thread.java:595)
>>> javax.jms.InvalidDestinationException: No durable subscription  
>>> exists for:
>>> 10.61.0.200:3808011111messageproxy-hpcg.MsgClientTopicTest
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker.region.TopicRegion.removeSubscription(TopicRegion.java:128)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker.region.RegionBroker.removeSubscription(RegionBroker.java:372)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.java: 
>>> 97)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.java: 
>>> 97)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.broker.BrokerFilter.removeSubscription(BrokerFilter.java: 
>>> 97)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker 
>>> .MutableBrokerFilter.removeSubscription(MutableBrokerFilter.java:107)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker 
>>> .TransportConnection 
>>> .processRemoveSubscription(TransportConnection.java:315)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .command.RemoveSubscriptionInfo.visit(RemoveSubscriptionInfo.java:83)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .broker.TransportConnection.service(TransportConnection.java:281)
>>>        at
>>> org.apache.activemq.broker.TransportConnection 
>>> $1.onCommand(TransportConnection.java:178)
>>>        at
>>> org 
>>> .apache 
>>> .activemq.transport.TransportFilter.onCommand(TransportFilter.java: 
>>> 67)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java: 
>>> 134)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .transport.InactivityMonitor.onCommand(InactivityMonitor.java:138)
>>>        at
>>> org 
>>> .apache 
>>> .activemq 
>>> .transport.TransportSupport.doConsume(TransportSupport.java:83)
>>>        at
>>> org 
>>> .apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java: 
>>> 185)
>>>        at
>>> org 
>>> .apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java: 
>>> 172)
>>>        at java.lang.Thread.run(Thread.java:595)
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/unsubscribe-unsuccess%21%21-tp14546901s2354p14572729.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/unsubscribe-unsuccess%21%21-tp14546901s2354p14574838.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message