activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prof <eng.mheg...@hotmail.com>
Subject Consumers threads get blocked
Date Tue, 29 Mar 2011 11:35:18 GMT
I have a standalone java application which has a punch of producers threads
which share one connection to vm embedded broker, and a punch of consumer
threads which also share the one connection.

i am using persistent messages in queue, but after a while the consumer
threads get blocked even the queue had a lot of pending messages!!!

No of producers is 8 threads and consumers are about 60 threads.

could you please help me to figure out the problem, the solution should be
very fast according to the required business.

i am connecting as below:
----------------------------

        ActiveMQConnectionFactory connectionFactory = 
            new ActiveMQConnectionFactory(mBrokerUser, mBrokerPassword,
mBrokerUrl);
            
                connectionFactory.setDispatchAsync(true);
                connectionFactory.setUseAsyncSend(true);
                connectionFactory.setOptimizeAcknowledge(false)
                connectionFactory.setWatchTopicAdvisories(false);
                connectionFactory.setCopyMessageOnSend(false);
                connectionFactory.setAlwaysSessionAsync(true);

        connection = connectionFactory.createConnection();
        session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        queue = session.createQueue(queueName);
        producer = session.createProducer(queue);
        producer.setDeliveryMode(DeliveryMode.PERSISTENT);
        connection.start();

--
View this message in context: http://activemq.2283324.n4.nabble.com/Consumers-threads-get-blocked-tp3414517p3414517.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message