activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: derby db using up lot of disk space
Date Thu, 05 Apr 2007 13:05:14 GMT
I'd recommend switching to a more traditional database like MySQL or
Postgresql for production usage. Or switch to AMQStore in 4.2

On 4/4/07, Suchitha Koneru (sukoneru) <sukoneru@cisco.com> wrote:
> 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();
>
> }
>
> }
>
> }
>
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message