activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avin98 <avi...@yahoo.com>
Subject RE: ActiveMQ memory utilization
Date Sat, 17 Feb 2007 02:51:41 GMT

Thanks for all the help, but it doesnt help me solve the issue. I use a
version of AMQ bundled along with Geronimo 1.1 release.



Suchitha Koneru (sukoneru) wrote:
> 
> I am using activemq-core-4.0.1.jar . Please change the version and see
> if you still find the issue of Messages not getting consumed, Also on
> the forum , 
> Click on this link , it talks about messages being stuck on  a queue.
> Hope this helps.
> http://www.nabble.com/Is-anyone-else-seeing-messages-stuck-on-a-queue--t
> f3027911.html#a8762238
> 
> -----Original Message-----
> From: avin98 [mailto:avin98@yahoo.com] 
> Sent: Thursday, February 15, 2007 6:15 PM
> To: users@activemq.apache.org
> Subject: RE: ActiveMQ memory utilization
> 
> 
> Sure thing, thats what I do. But I find that if the messages don't get
> consumed:
> 
> 1- They don't expire in spite of setting a TimeToLive
> 2- Consume more memory and slow up the other operations.
> 
> I am using AMQ v 3.2.4 bundled inside WASCE 1.1
> 
> 
> 
> 
> Suchitha Koneru (sukoneru) wrote:
>> 
>> On the Receiver side , make sure that  you start the queue connection 
>> , after you  create the active MQ receiver . Some times the messages 
>> might be lost , if we start the queue connection , before creating the
> 
>> receiver.
>> 
>> -----Original Message-----
>> From: avin98 [mailto:avin98@yahoo.com]
>> Sent: Thursday, February 15, 2007 5:39 PM
>> To: users@activemq.apache.org
>> Subject: RE: ActiveMQ memory utilization
>> 
>> 
>> import java.io.IOException;
>> import java.util.Date;
>> 
>> import javax.jms.DeliveryMode;
>> import javax.jms.JMSException;
>> import javax.jms.Queue;
>> import javax.jms.QueueConnection;
>> import javax.jms.QueueSender;
>> import javax.jms.QueueSession;
>> import javax.jms.Session;
>> import javax.jms.TextMessage;
>> import javax.servlet.ServletException; import 
>> javax.servlet.http.HttpServlet; import 
>> javax.servlet.http.HttpServletRequest;
>> import javax.servlet.http.HttpServletResponse;
>> 
>> 
>> public class TestServlet extends HttpServlet{
>> 	
>> 	public void doGet(HttpServletRequest request,
> HttpServletResponse 
>> response)
>>     throws IOException, ServletException {
>> 		doPost(request, response);
>> 	}
>> 	
>> 	public void doPost(HttpServletRequest request,
> HttpServletResponse
>> response)
>>     throws IOException, ServletException {
>> 		
>> 		String ttl = request.getParameter("TTL");
>>         String oper = request.getParameter("OPER");
>>         
>> //      Get the JMS Service Locator
>>         QueueLocator locator = QueueLocator.getInstance();
>> 
>>         QueueSender sender = null;
>>         QueueSession publishSession = null;
>>         QueueConnection connection = null;
>>         
>>         String str = "MESSAGE BODY";
>> 
>>         try {
>> 
>>             // create jms session
>>             boolean transacted = false;
>>             connection = (QueueConnection) 
>> QueueLocator.getInstance().getConnectionFactory().createConnection();
>>             
>>             publishSession =
>> connection.createQueueSession(transacted,Session.AUTO_ACKNOWLEDGE);
>>             
>>             
>>             
>>             // Get the JMS Queue
>>             Queue queue;
>> 
>>             queue = locator.getMessageQueue();
>> 
>>             System.out.println("Queue is:" + queue);
>>             
>>             // Get a Queue Sender
>>             sender = publishSession.createSender(queue);
>>             // The Messages are set to be temporary
>>             sender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
>> 
>>             TextMessage message = publishSession.createTextMessage();
>>             message.setText(str);
>>             //message.setJMSCorrelationID(corelationId);
>> 
>>             sender.setTimeToLive(300000);
>> 
>>             System.out.println("Message properties:"+ 
>> message.getJMSExpiration());
>>             System.out.println(new Date(sender.getTimeToLive()));
>>             
>>             sender.send(message);
>> 
>>             // log the stuff
>>             System.out.println("Message sent off successfully");
>> 
>>         } catch (JMSException e) {
>>             e.printStackTrace();
>>         } finally {
>>         	try{
>>         		sender.close();
>>         		publishSession.close();
>>         		connection.close();
>>             } catch(Exception e){
>>         		e.printStackTrace();
>>         	}
>>         }
>> 
>> 	}
>> }
>> 
>> --
>> View this message in context:
>> http://www.nabble.com/ActiveMQ-memory-utilization-tf3237215s2354.html#
>> a8
>> 997556
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> 
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/ActiveMQ-memory-utilization-tf3237215s2354.html#a8
> 997890
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-memory-utilization-tf3237215s2354.html#a9016206
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message