Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 72057 invoked from network); 26 Oct 2006 05:58:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 05:58:09 -0000 Received: (qmail 10144 invoked by uid 500); 24 Oct 2006 17:34:16 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 10131 invoked by uid 500); 24 Oct 2006 17:34:16 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 10117 invoked by uid 99); 24 Oct 2006 17:34:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 10:34:15 -0700 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 10:34:03 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1GcQ9m-00064y-KF for activemq-users@geronimo.apache.org; Tue, 24 Oct 2006 10:33:42 -0700 Message-ID: <6977787.post@talk.nabble.com> Date: Tue, 24 Oct 2006 10:33:42 -0700 (PDT) From: sileshi To: activemq-users@geronimo.apache.org Subject: Re: BytesMessage vs. already compressed byte[] payloads - fixed in 4.x? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sileshikassa@yahoo.com References: X-Virus-Checked: Checked by ClamAV on apache.org Hiram Chirino wrote: > >>Amq 4 should not be uncompressing message contents (unless it's sending to a >>STOMP client I think). Each message has flag indicating if the message >>content is compressed or not. > Well, even for sending to Stomp, AMQ should not uncompress the bytes > message. > The contract between Java JMS client and Message Broker is to transmit the > byte streams to consumers with no alterations. This is true of > irrespective of > the consumer is Java JMS and Stomp client. > > The thinking is RPC can be built over Java JMS and Stomp. Thus, RPC > implmentation > may have one or more protocol (one protocol envolpes another) encoding, > and data > that is compressed using standard or non-standard techniques. > > The way to deal with this is by not interpreting/altering the byte > streams. > > Regards, > Sileshi > > On 10/18/06, Holger Hoffstaette wrote: >> >> >> Hi, >> >> ActiveMQ 3.x unconditionally uncompresses BytesMessages whose input >> byte[] >> was already compressed with the JDK-builtin GZip stuff. This is obviously >> wrong since the compressed original byte[] should come out on the other >> end, not the huge uncompressed payload. Is this fixed in 4.x? I figured I >> ask before I forward-port. This bug makes ActiveMQ susceptible to DOS >> attacks, even unintentionally if someone sends a meager 10 MB of >> compressed XML over the wire that is exploded to >1GB, taking the VM with >> it. >> A simple ActiveMQ-specific prepended tag indicating transport-level >> compression (or not) would help to distinguish between the two. If this >> warrants a JIRA please yell. > > > > You want to distinguish between compressed and uncompressed messages? > This > can be done on a per message basis. I don't think it has anything to do > with the transport. > > thanks >> Holger >> >> PS: http://en.wikipedia.org/wiki/Zip_of_death, s/zip/gzip/r ;) >> >> >> > > > -- > Regards, > Hiram > > Blog: http://hiramchirino.com > > -- View this message in context: http://www.nabble.com/BytesMessage-vs.-already-compressed-byte---payloads---fixed-in-4.x--tf2469871.html#a6977787 Sent from the ActiveMQ - User mailing list archive at Nabble.com.