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: Blob Message is a skin game??? not real ?!??
Date Mon, 13 Aug 2007 10:56:38 GMT
On 8/13/07, OnlyLove <v.plussharp@gmail.com> wrote:
>
> I send the blob message using...
>
> BlobMessage message = session.createBlobMessage(new
> URL("http://localhost:8080/test.pdf"));
>
> then, I close the tomcat server, and try to get the message from the amq
> broker,
> fail ! (it seems that the blob message just send the url to the broker, but
> not the real data of the file!)

This is by design. If you create a blob message using a URL, the
assumption is that the URL points to some hosted file server / web
server and that is where the data will remain.

If you want ActiveMQ to actually take ownership of the data, then
create a BLOB message using a File / InputStream as the command
argument. See the JavaDoc.

http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/ActiveMQSession.html#createBlobMessage(java.net.URL)

also the documentation explains this
http://activemq.apache.org/blob-messages.html

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

Mime
View raw message