activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Gale <paul.n.g...@gmail.com>
Subject Inconsistent exception messages.
Date Wed, 28 Aug 2013 16:39:38 GMT
ActiveMQ 5.8.0 on RHEL 6.1 connecting w/STOMP 1.2.

I have noticed that the exception messages that can be returned via an
ERROR frame can vary in format for the same exception type depending on
where in the source it originated.

In my STOMP client I parse out the message header of the ERROR frame using
a regex. A lot of variability can be handled by making the regex case
insensitive. However, there is a definite refactoring opportunity for the
ActiveMQ source to make the creation and format of these messages more
consistent.

I searched for all occurrences of ResourceAllocationException and based on
that I came up with the following messages that could be returned to the
client via an ERROR frame. I have seen a number of them appear already
through experimentation. For clarity I simplified the message strings,
taken from the source, by removing the '+' symbols and some variable names.


The following suffer from inconsistent use of parentheses and inconsistent
casing:

'Temp Store is Full (getTempUsage().getPercentUsage()% of
systemUsage.getTempUsage().getLimit()). Stopping producer
(message.getProducerId()) to prevent flooding
getActiveMQDestination().getQualifiedName().'
'Persistent store is Full, getStoreUsageHighWaterMark()% of
systemUsage.getStoreUsage().getLimit(). Stopping producer
(message.getProducerId()) to prevent flooding
getActiveMQDestination().getQualifiedName().'


The following suffer from inconsistent phrasing, inconsistent use of
parentheses and inconsistent casing:

'Usage Manager Memory Limit reached. Producer (getProducerId()) stopped to
prevent flooding getQualifiedName().'
'Usage Manager Memory Usage limit reached. Stopping producer
(getProducerId()) to prevent flooding getQualifiedName().'
'Usage Manager Memory Limit reached. Stopping producer
(timeout.message.getProducerId()) to prevent flooding
getActiveMQDestination().getQualifiedName().'
'Usage Manager memory limit (memoryUsage.getLimit()) reached. Rejecting
send for producer (message.getProducerId()) to prevent flooding
getActiveMQDestination().getQualifiedName().'

Can this be cleaned up in the broker codebase?

BTW, what is the difference in meaning (and associated consequences)
between 'stopping a producer', 'producer stopped' and 'rejecting send for
producer'? I don't have enough context for each calling location to know.
Intuitively they all sound roughly the same to me.

What exceptions, other than ResourceAllocationException, are possible
candidates for appearing in an ERROR frame?

Thanks,
Paul

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