activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Davies (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (AMQ-2164) The MaximumPendingMessageLimit option is doesn't work in .Net
Date Sun, 13 Sep 2009 10:38:12 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-2164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Davies reassigned AMQ-2164:
-------------------------------

    Assignee: Timothy Bish

> The MaximumPendingMessageLimit option is doesn't work  in .Net
> --------------------------------------------------------------
>
>                 Key: AMQ-2164
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2164
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.2.0
>         Environment:  ActiveMQ 5.2, XP 64,NMS, NMS.ActiveMQ, vs2008 ,java1.6 ant build
the activemq 
>            Reporter: xinfang.yuan
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 5.4.0
>
>         Attachments: Activemq.xml, ActiveMQPendingMessageTest.zip
>
>
> I tried to test the MaximumPendingMessageLimit property in donet . But it doesn't work.
i tried to setup it in Code, and  ActiveMQ.XML ,it both doesn't work
> 1. Create a durable consumer
> 2. Create a producer and send message in topic (persistent send)
> 3. Consumer get message and try to block the consumer speed. (speed is slow )
> 4 Go to web console check the pendingmessage number
> The number should be keeping the maxpendingmessage number. My consumer is slow the producer
is faster. But I found out the number is still grow.
> i will create another test poster and attach the test file in there
> http://www.nabble.com/pendingmessagelimit-option-seems-doesn%27t-work!-td22447336r0.html
> By the way there have another people test it , it also doesn't work for Java.
> http://www.nabble.com/Fast-producers%2Cslow-consumer...-queue-growing-forever-td22373306.html
> Thanks
> Sample code---- include connection, session, consumer and producer
> ---------
> public TopicConnection(IConnectionFactory connectionFactory, string clientId, string
topicName)
> {
> this.connection = connectionFactory.CreateConnection() as Connection ;
> this.connection.ClientId = clientId;
> if (!this.connection.IsStarted)
> { this.connection.Start(); }
> this.session = this.connection.CreateSession(AcknowledgementMode.ClientAcknowledge) as
Session;
> session.MaximumPendingMessageLimit = 10;
> session.PrefetchSize = 20;
> this.topic = new ActiveMQTopic(topicName);
> }
> -------------------------------
> ----- running another console to get message--
> IMessageConsumer consumer = this.session.CreateDurableConsumer(this.topic, consumerId,
"2 > 1", false);
> consumer.Listener += new MessageListener(consumer_Listener);
> void consumer_Listener(IMessage message)
> {
> ActiveMQTextMessage msg = message as ActiveMQTextMessage; Console.WriteLine("Message
received:" + "Id = " + msg.NMSMessageId + ", Content:" + msg.Text); Thread.sleep(1000);//block
here message.Acknowledge(); 
> }
> ---- running another console to send message
> IMessageProducer producer = this.session.CreateProducer(this.topic);
> while (true)
> {
>  publisher.SendMessage("Message:" + DateTime.Now.ToString("yyyy-mm-dd HH:MM:ss") + "---"
+ i.ToString() );
> } 
> And both setup it into activemq.xml
> <destinationPolicy>
>          <policyMap>
>               <policyEntries>
>                    <policyEntry topic=">">
>                            <dispatchPolicy>
>                              <strictOrderDispatchPolicy />
>                             </dispatchPolicy>
>            <pendingMessageLimitStrategy>
>               <constantPendingMessageLimitStrategy limit="10"/>
>             </pendingMessageLimitStrategy>
>                     </policyEntry>
>             </policyEntries>
>        </policyMap>
> </destinationPolicy 

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


Mime
View raw message