activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: About Blob Message
Date Fri, 22 Jun 2007 16:31:14 GMT
On 6/22/07, tom@hostwebase.com <tom@hostwebase.com> wrote:
>
>
> At the web page with URL http://activemq.apache.org/blob-messages.html , it
> only shows briefly how to send, but it doesn't show how to receive BLOB
> messages. Can you show me the web pages that show how to receive BLOB
> messages?

See
http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/BlobMessage.html

All JMS messages are received in the same way.

public class MyListener implements MessageListener {
  public void onMessage(Message message) {
    if (message instanceof BlobMessage) {
      BlobMessage blobMessage = (BlobMessage) message;
      InputStream in = blobMessage.getInputStream();

      // process the stream...
    }
  }
}

>
> Thanks a lot
> --
> View this message in context: http://www.nabble.com/How-to-send-file-using-ActiveMQ-tf3960326s2354.html#a11253564
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
James
-------
http://macstrac.blogspot.com/

Mime
View raw message