You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by watcher <pa...@daly.ws> on 2010/08/05 10:27:09 UTC

Blobmessage question

I'm trying to understand the use of blobmessage and if it could be a possible
solution to a requirement I have.

>From reading the ActiveMQ in Action I can see that you can send a file via
blobmessage

BlobMessage message = session.createBlobMessage(new
URL("http://some.shared.site.com/bigfile
producer.send(message);

1. Is it possible to send the file as part of the message or does it have to
sent out of band before creating the message. ie. The blob message is really
a link to an remote resource which will be automatically loaded by the
consumer.

2. Is it  possible to send an object (POJO) along with the blobmessage. The
idea that the consumer could receive a pojo and an remote file.

To give you an idea of what I thinking. I have a object that contains an
image. I'd like to send the image along with its properties to a queue and
the consumer would retrieve the image via blobmessage and its properties. If
I set a prefetch = 2 , will the consumer have a second message loaded and
ready to be consumed. What I hoping is to reduce the delay between
retrieving the image remotely.

-Paddy


-- 
View this message in context: http://old.nabble.com/Blobmessage-question-tp29354676p29354676.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Blobmessage question

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

you can create blob message from File, URL or InputStream so you can
theoretically send any byte[] as a blob message. ActiveMQ will
underneath send it to the remote http or ftp server and send that link
in a JMS message. So consumer can receive it.

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net



On Thu, Aug 5, 2010 at 10:27 AM, watcher <pa...@daly.ws> wrote:
>
> I'm trying to understand the use of blobmessage and if it could be a possible
> solution to a requirement I have.
>
> From reading the ActiveMQ in Action I can see that you can send a file via
> blobmessage
>
> BlobMessage message = session.createBlobMessage(new
> URL("http://some.shared.site.com/bigfile
> producer.send(message);
>
> 1. Is it possible to send the file as part of the message or does it have to
> sent out of band before creating the message. ie. The blob message is really
> a link to an remote resource which will be automatically loaded by the
> consumer.
>
> 2. Is it  possible to send an object (POJO) along with the blobmessage. The
> idea that the consumer could receive a pojo and an remote file.
>
> To give you an idea of what I thinking. I have a object that contains an
> image. I'd like to send the image along with its properties to a queue and
> the consumer would retrieve the image via blobmessage and its properties. If
> I set a prefetch = 2 , will the consumer have a second message loaded and
> ready to be consumed. What I hoping is to reduce the delay between
> retrieving the image remotely.
>
> -Paddy
>
>
> --
> View this message in context: http://old.nabble.com/Blobmessage-question-tp29354676p29354676.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>