Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B5C0610328 for ; Fri, 30 Aug 2013 15:44:00 +0000 (UTC) Received: (qmail 88285 invoked by uid 500); 30 Aug 2013 15:43:59 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 88182 invoked by uid 500); 30 Aug 2013 15:43:54 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 88173 invoked by uid 99); 30 Aug 2013 15:43:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2013 15:43:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gary.tully@gmail.com designates 209.85.214.169 as permitted sender) Received: from [209.85.214.169] (HELO mail-ob0-f169.google.com) (209.85.214.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2013 15:43:47 +0000 Received: by mail-ob0-f169.google.com with SMTP id es8so2064993obc.0 for ; Fri, 30 Aug 2013 08:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=TvIh8GITWjlZqxeI+5rrsSy0dh/1mKs0STvDFKqlgAc=; b=ohJcYgDU+TedZ60++iToO/UJqewSMvFyVqcsAsxIIg2fH8StApljb4yb8ZkJ6CYDi8 9Qz6gwX5Pfkma4ihwTmIHIKNYuWg5DGQBUqXnWuNwwTxQ+GkBRi6hnFcTAp5hHd2JaqC CEw4TgyAaxcMfVFd0TUt4zr8bTXLZywOfzGbAh1bRVTBY/4QLVeMIcYpsTngp9qRGHyL wMaFIsGkqJ2HgjXLDrcmymQOoQU2C76t1WIDn7vzZc8AsEaLizsIYw5dp7lZCBVt2rUV kVRkYaKzuqPyxY3cRb9Q06Lh628oX9HNSNNgjzgA+iPSMAbpV1dwXv7zJ430b4GZkNJl wjVw== MIME-Version: 1.0 X-Received: by 10.182.44.167 with SMTP id f7mr5559754obm.3.1377877407165; Fri, 30 Aug 2013 08:43:27 -0700 (PDT) Received: by 10.182.85.69 with HTTP; Fri, 30 Aug 2013 08:43:27 -0700 (PDT) In-Reply-To: References: Date: Fri, 30 Aug 2013 16:43:27 +0100 Message-ID: Subject: Re: Inconsistent exception messages. From: Gary Tully To: "users@activemq.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org please open a jira issue to track this, they should be more consistent, in all cases where ResourceAllocationException is thrown the send is being rejected. The detail should be confined to the server side logging really, the client can't reasonably interpret the message in any sensible way, unless it is forwarded to a sys admin. On 28 August 2013 17:39, Paul Gale wrote: > 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 -- http://redhat.com http://blog.garytully.com