activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <premiergenerat...@yahoo.com>
Subject Re: ActiveMQ Outputstream message properties
Date Mon, 19 Jun 2006 01:15:27 GMT

Hello, 
I looked a little at the API and it appears that the message is created here
(line 124 in flushbuffer)... I don't think there is any capabilities there
to set properties on the message.  Am i mistaken or barking up the wrong
tree?

Thanks,
Yogesh

      public synchronized void write(byte b[], int off, int len) throws
IOException {
104            while(len > 0) {
105                int max = Math.min(len, buffer.length-count);            
106                System.arraycopy(b, off, buffer, count, max);
107                
108                len -= max;
109                count += max;
110                off += max;
111                
112                if (count == buffer.length) {
113                    flushBuffer();
114                }
115            }
116        }
117        
118        synchronized public void flush() throws IOException {
119            flushBuffer();
120        }
121        
122        private void flushBuffer() throws IOException {
123            try {
124                ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
125                msg.writeBytes(buffer, 0, count);
126                send(msg, false);
127            } catch (JMSException e) {
128                throw IOExceptionSupport.create(e);
129            }
130            count=0;        
131        }
--
View this message in context: http://www.nabble.com/ActiveMQ-Outputstream-message-properties-t1807819.html#a4929312
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message