Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 524B1182CA for ; Wed, 24 Feb 2016 12:08:55 +0000 (UTC) Received: (qmail 70013 invoked by uid 500); 24 Feb 2016 12:08:50 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 69948 invoked by uid 500); 24 Feb 2016 12:08:50 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 69935 invoked by uid 99); 24 Feb 2016 12:08:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2016 12:08:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 860B71804EF for ; Wed, 24 Feb 2016 12:08:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.033 X-Spam-Level: ** X-Spam-Status: No, score=2.033 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_NEUTRAL=0.652, URI_HEX=1.313, URI_TRY_3LD=0.068] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id GMWS6rC9SJze for ; Wed, 24 Feb 2016 12:08:47 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 52F875FB4C for ; Wed, 24 Feb 2016 12:08:47 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 9787117335AEC for ; Wed, 24 Feb 2016 04:00:04 -0800 (PST) Date: Wed, 24 Feb 2016 03:42:33 -0800 (PST) From: davyv To: dev@activemq.apache.org Message-ID: <1456314153440-4708209.post@n4.nabble.com> Subject: MQTT To JMS: Payload (de)compression MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm working on a project where I connect clients over MQTT and subscribers over JMS to an activeMQ instance. For saving data (Wireless 3G) over the MQTT connection, I am compressing the data in the MQTT client. And now I'm trying to figure out a way to decompress the data. I was looking to create a custom decompression interceptor to deploy into the activeMQ instance, however I ran into some issues. I override the 'send' method from the BrokerFilter. And try to replace the content with a decompressed bytearray. And the activeMQ configuration: I keep getting the exception that the message (BytesMessage) body is write-only, so I'm unable to read the content ('bytesMessage.readBytes(buffer)'). Is an interceptor in activeMQ the best option for this? And how would this best be implemented? Does activeMQ have anything else for this? Or is the JMS client a better option? If a use an interceptor? When exactly is this executed? Are there charts that show the flow of an interceptor? What happens when implementing more than one interceptor? What is the order that they are called? As far as I can find in the specs, MQTT does not have an option in the protocol to compress the connection. However if anyone knows a standard option for this. -- View this message in context: http://activemq.2283324.n4.nabble.com/MQTT-To-JMS-Payload-de-compression-tp4708209.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.