activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: ActiveMQ Topic Messages Not Delivered
Date Sat, 31 Oct 2015 04:42:25 GMT
I'm glad you were able to resolve the issue; it's possible you simply ran
out of space in your KahaDB instance but didn't have the limits set to keep
you from running off the edge, though I'm surprised that didn't result in
exceptions in the logs if that's really what it was.  Seems strange.

Re: #1: Do you remember what the other two advisory topic names were?  I've
seen topics for producers, consumers, and expired messages, and each is
created when someone subscribes to it or someone publishes to it (whichever
happens first), so it's possible that the other two haven't happened yet.
(There are two ways of publishing messages, one that creates a publisher
advisory and one that doesn't, and I think that JMSTemplate uses the one
that doesn't, so that makes sense for what you're seeing.)

Re: #2: I have no idea, but maybe someone else does.

Re: #3: I've never done anything with Fuse, so I have no idea, but maybe
someone else does.

Re: #4: Unless Fuse does something strange, an ActiveMQ broker generally
writes to only one log, so I don't think there would be any other log files
you'd need to look in.

Tim

On Fri, Oct 30, 2015 at 9:51 AM, swone <stevewallone@hotmail.com> wrote:

> See below for answer to the questions. Here's some more information on
> changes made that seem to have gotten things working. The logs showed a
> message -
>
> Getting Worried {org.apache.activemq.FreeDiskSpaceLeft: WARNING Store limit
> is 33205 mb, whilst the data directory:
>
> /opt/jboss-fuse-pre-patched-6.2.0.redhat-143-p1/instances/dg-amq-1/data/dg-amq-1/kahadb
> only has 28337 mb of usable space from
>
> KahaDBPersistenceAdapter[/opt/jboss-fuse-pre-patched-6.2.0.redhat-143-p1/instances/dg-amq-1/data/dg-amq-1/kahadb]
> ,  }
>
> Other threads indicated this was a problem with the systemUsage parameters
> in the activemq.xml. Which I changed -
>
> *Original*
>                 <storeUsage>
>                     <storeUsage limit="100 gb"/>
>                 </storeUsage>
>                 <tempUsage>
>                     <tempUsage limit="50 gb"/>
>                 </tempUsage>
> *Modification*
>                 <storeUsage>
>                     <storeUsage limit="20 mb"/>
>                 </storeUsage>
>                 <tempUsage>
>                     <tempUsage limit="20 mb"/>
>                 </tempUsage>
>
> After making these changes, I bounced the server and restarted my processes
> and message started flowing again.
>
> <
> http://activemq.2283324.n4.nabble.com/file/n4703531/activemqtopic_working.png
> >
>
> A few things I find puzzling, which makes me think I'm just missing
> something :
>
> 1) When messages were not being delivered, there were 4 Topics, 3 created
> by
> ActiveMQ and 1 created by the Producer. When messages are being delivered,
> there are only 2. Why is that?
>
> 2) The warning message indicated the store limit as 33205 mb, whereas
> activemq.xml had it specified as 100 gb. I also wasn't able to located any
> configuration files containing a "mb" specification. Why the disconnect?
>
> 3) The activemq.xml file I changed was located at $FUSE_HOME/etc. The
> documentation indicates this is used as a template when creating new
> instances. In $FUSE_HOME/instances/amq-1/etc the file doesn't exist. I
> would
> have expected the template file would have been added to the instance
> directory and then the instance could be tweaked independently of other
> instances. Does this mean all activemq instances will use the same
> activemq.xml?
>
> 4) When messages are not delivered, I found nothing in the logs indicating
> the failure. There was just the one warning message. I looked in
> $FUSE_HOME/data/log and $FUSE_HOME/instances/amq-1/data/log. Are there
> other
> log directories that I may be missing?
>
> ------------------------
> *Replies to e-mail questions*
> Stepping through the code in the debugger show a successful publish of the
> message. Also running in Cloud Foundry produced the log entry that the
> message was successfully published.
>
>
> Tim Bain wrote
> > Also, do I understand correctly that "2 Consumers with no message
> Enqueued
> > or Dequeued" means no additional messages enqueued/dequeued once the
> > problems start, not that the number is actually 0?
>
> This is correct. No message enqueued/dequeue once the issue started.
>
>
> Tim Bain wrote
> > Am I right to assume that if there were any errors in either the broker
> > logs or the producer logs, you'd have mentioned them?
>
> Correct. The only log message was the aforementioned warning.
>
> *Java / Spring*
>
> // Same code snippet in Producer and Consumer to create the factory
>         ActiveMQConnectionFactory activeMQConnectionFactory = new
> ActiveMQConnectionFactory();
>
>
>
> activeMQConnectionFactory.setBrokerURL(environment.getProperty("jms.host"));
>
>
> activeMQConnectionFactory.setUserName(environment.getProperty("jms.username"));
>
>
> activeMQConnectionFactory.setPassword(environment.getProperty("jms.password"));
>
> *Publisher *
>
> // Publishing snippet
>         logger.debug("Topic : " + topicName);
>         logger.debug("Queuing message: " + message);
>
>         ObjectMapper mapper = new ObjectMapper();
>         mapper.setSerializationInclusion(Include.NON_NULL);
>
>         try
>         {
>             jmsTemplate.setPubSubDomain(true);
>             jmsTemplate.setExplicitQosEnabled(true);
>             jmsTemplate.setTimeToLive(MESSAGE_TTL);
>             jmsTemplate.convertAndSend(topicName,
> mapper.writeValueAsString(message));
>
>             logger.debug("Successfully sent to : " + topicName);
>
> *Consumer*
>
> // Snippet creating listener/consumer
>         DefaultMessageListenerContainer messageListener = new
> DefaultMessageListenerContainer();
>
>         messageListener.setSessionTransacted(true);
>         messageListener.setDestinationName(destinationName);
>         messageListener.setConnectionFactory(jmsFactory);
>         messageListener.setMessageListener(listener);
>         messageListener.setPubSubDomain(true);
>         messageListener.initialize();
>         messageListener.start();
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Topic-Messages-Not-Delivered-tp4703502p4703531.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

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