activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bill richard (JIRA)" <>
Subject [jira] Created: (AMQ-1536) Dural-subScriber can not receive message!
Date Fri, 04 Jan 2008 05:12:44 GMT
Dural-subScriber can not receive message!

                 Key: AMQ-1536
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.0.0
            Reporter: bill richard
             Fix For: 5.1.0

situation like this:

		TopicSession session = null;
		TopicConnection connection = null;
		try {
			ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("", "", "tcp://");
			connection = connectionFactory.createTopicConnection("","");

			session = connection.createTopicSession(false,
			Topic userReceiver = session.createTopic("test_unsubscribe_topic");
			TopicSubscriber ts=session.createDurableSubscriber(userReceiver,"sub_123");
			ts.setMessageListener(new MessageListener(){
                           public void onMessage(Message msg){
                                     System.out.prinltn("Receie:"+msg+" Date:"+new Date());

                        Thread.sleep(about 2 hours);
                      then send one message to topic test_unsubscribe_topic

made a connection with argument maxInactivityDuration=0 , then made a dural-subscribe to a
topic use that connection,if there is no message on this topic for a long time,then when 
one message was send to that topic,the subscriber will not got the message.
If you shut down your subscriber program ,then restart it ,it reports a "already connected

Also i changed AMQ 5.0 source code according to issue 1525,
Maybe this is because the socket the subscriber use is in half-open state.
hope these helps!

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

View raw message