activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suchitha Koneru \(sukoneru\)" <sukon...@cisco.com>
Subject derby db using up lot of disk space
Date Wed, 04 Apr 2007 22:12:17 GMT
Hello Active MQ Users, 
                     I am using active mq 4.0,.2. I am using a durable
subscriber and topic publisher with non present mode of delivery. The
derby db  has grown to be of the size of 13 GB. is this a bug in 4.0.2 ?
has any one of you encountered such a problem. This is using up all the
disk space. Please let me know. The code snippets for publisher and
subscriber are as follows 
 
// publisher code 
tc = getConn();

Sess = getSession(tc);

topic = getTopic();

logger.info("the sender topic is :"+topic);

try{

pub = Sess.createPublisher(topic);

if(pub != null){

pub.setTimeToLive(300000);

pub.setDeliveryMode(DeliveryMode.NON_PERSISTENT);

tc.start();

}else{

logger.error("JMS Event sender , publisher is null");

}

// subscriber code
public TopicSubscriber createSubscriber() {

try {

String durableSusbscriptionName =
jmsProperties.getProperty(DURABLE_SUBSCRIPTION_NAME);

Subs = Sess.createDurableSubscriber(topic, durableSusbscriptionName);

Subs.setMessageListener(new JmsMessageListener());

}catch(Exception ex) {

logger.error("Exception while creating subscriber for topic " +
ex.getMessage());

ex.printStackTrace();

}

return Subs;

}

class JmsMessageListener implements MessageListener {

public void onMessage(Message m) {

try {

HerbieEvent evt = null;

if(m instanceof ActiveMQObjectMessage){

ActiveMQObjectMessage obj = (ActiveMQObjectMessage) m;

HerbieEvent event = (HerbieEvent) obj.getObject();

System.out.println(event.getMessage());

}

}

}else {

// Not a relevent Herbie event, ignore

}

}catch(Exception ex) {

logger.error("ERROR: while receiving event "+ex.getMessage());

ex.printStackTrace();

}

}

}

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message