Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 84341 invoked from network); 18 Jun 2006 19:42:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Jun 2006 19:42:39 -0000 Received: (qmail 81072 invoked by uid 500); 18 Jun 2006 19:42:39 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 80906 invoked by uid 500); 18 Jun 2006 19:42:38 -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 80896 invoked by uid 99); 18 Jun 2006 19:42:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Jun 2006 12:42:38 -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 (asf.osuosl.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; Sun, 18 Jun 2006 12:42:37 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1Fs3A1-00065z-AJ for activemq-users@geronimo.apache.org; Sun, 18 Jun 2006 12:42:17 -0700 Message-ID: <4926668.post@talk.nabble.com> Date: Sun, 18 Jun 2006 12:42:17 -0700 (PDT) From: ychawla To: activemq-users@geronimo.apache.org Subject: ActiveMQ Outputstream message properties MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: premiergeneration@yahoo.com X-Nabble-From: ychawla X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello All, I am sending a large file using an Active MQ output stream. I would like to set message properties on the messages that I am sendingout (they will be the same for all messages for a particular file). How can i do this? Here is my code snippet. The reason I need to set properties is because this file will be dropped in a certain directory after it reaches the queue on the other machine. activeMQOutputStream = ((ActiveMQConnection)connectionFactory.createConnection()).createOutputStream(queue); BufferedInputStream in = new BufferedInputStream(new FileInputStream(returnFileName)); //Couldn't get this working with the buffers... the char by char read seems fine /* byte[] buf = new byte[32768]; // 32k buffer int c = 0; do { c = in.read(buf,0,32768); if (c > 0) activeMQOutputStream.write(buf,0,c); } while (c >= 0); */ while ((value = in.read()) != -1) { activeMQOutputStream.write((char)value); } in.close(); activeMQOutputStream.flush(); activeMQOutputStream.close(); -- View this message in context: http://www.nabble.com/ActiveMQ-Outputstream-message-properties-t1807819.html#a4926668 Sent from the ActiveMQ - User forum at Nabble.com.