activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Buss <>
Subject Re: Blob Messages ??? does it work ???
Date Sun, 30 Dec 2007 20:53:57 GMT
In general it works, but it is a little bit tricky i think.
First keep in mind that the message only holds the reference to your 
blob. It works for you with an URL becaus the publisher must not send 
the blob to the so called uploadurl. That url must point to the 
fileserver webapp (you can find it on the source-distribution). This 
webapp must be able to handle PUT http-Messages. So if you dont like the 
fileserver webapp which is made for jetty have a look at the code an 
write another one.

You can specify the url like this:
TopicPublisher publisher = new 

tells the publischer to upload all blobs to the url 

I hope this helps a little bit. But notice at this point of time, the 
broker donĀ“t delets the blob by itself after all consumers have 
processed the message. See Bug AMQ-1529:

CBT schrieb:
> I'm trying to use ActiveMQ V5 to send and receive Blob messages this is a new
> features with this version.
> there are three ways to send these kind of messages :
> file  :           BlobMessage message = session.createBlobMessage(new
> File("c://mkv.txt")); 
> URL :           BlobMessage message = session.createBlobMessage(new
> URL(""));
> stream :       InputStream inStream = new FileInputStream("c://mkv.txt");
>                   BlobMessage message = session.createBlobMessage(inStream);
> it works with URL
> but it does not work with file or stream
> the consumer sends a java.lang.NullPointerException but knows that it
> receives an instance of Blob message
> I'm quite disappointed, some other posts say that it does not work, is that
> real ?
> is there something I forgot ? is there something special to add or
> configure, for file or stream ?

View raw message