You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Norman Maurer <no...@apache.org> on 2010/03/02 08:42:51 UTC

Example of using BlobMessage

Hi all,

we just switched to using Camel + Activemq for message routing and
spooling in JAMES. At the moment we store the whole MimeMessage as a
byte array in the payload of the Exchange. This is super inefficient
because of the possibility of very big emails. So I consider using
BlobMessages for storing the MimeMessage out of the band. So is there
any example in sending a BlobMessage via ProducerTemplate ?


Thx,
Norman

Re: Example of using BlobMessage

Posted by Norman Maurer <no...@googlemail.com>.
Hi Claus,

after having more thoughts about the claim check thing, I don't think
its the right thing for my need. I need to be able to lazy load some
stuff on demand. I don'T know when I need it because users can plugin
their own implementation to process the object. Sometimes they don't
need to access the MimeMessage so I don'T want to load it. Sometimes
they do.


So I need more something like lazy loading in the JPA world.. So I
will look into the BlobMessage.

Thx again,
Norman

2010/3/2 Norman Maurer <no...@googlemail.com>:
> Hi Claus,
>
> yeah claim check sounds like the one I was looking for.
>
> Yes I was refering the the AMQ BlobMessage because from my
> understanding it is the way you usual handle such stuff with AMQ.
>
> Thx again,
> Norman
>
> 2010/3/2 Claus Ibsen <cl...@gmail.com>:
>> On Tue, Mar 2, 2010 at 8:42 AM, Norman Maurer <no...@apache.org> wrote:
>>> Hi all,
>>>
>>> we just switched to using Camel + Activemq for message routing and
>>> spooling in JAMES. At the moment we store the whole MimeMessage as a
>>> byte array in the payload of the Exchange. This is super inefficient
>>> because of the possibility of very big emails. So I consider using
>>> BlobMessages for storing the MimeMessage out of the band. So is there
>>> any example in sending a BlobMessage via ProducerTemplate ?
>>>
>>
>> By out of band I assume you mean the claim check EIP?
>> http://camel.apache.org/claim-check.html
>>
>> And BlobMessage is it the AMQ type?
>> org.apache.activemq.BlobMessage
>>
>> I recon you need to grab the InputStream from the BlobMessage to be
>> used as the body to be send using ProducerTemplate.
>>
>>
>>>
>>> Thx,
>>> Norman
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>

Re: Example of using BlobMessage

Posted by Norman Maurer <no...@googlemail.com>.
Hi Claus,

yeah claim check sounds like the one I was looking for.

Yes I was refering the the AMQ BlobMessage because from my
understanding it is the way you usual handle such stuff with AMQ.

Thx again,
Norman

2010/3/2 Claus Ibsen <cl...@gmail.com>:
> On Tue, Mar 2, 2010 at 8:42 AM, Norman Maurer <no...@apache.org> wrote:
>> Hi all,
>>
>> we just switched to using Camel + Activemq for message routing and
>> spooling in JAMES. At the moment we store the whole MimeMessage as a
>> byte array in the payload of the Exchange. This is super inefficient
>> because of the possibility of very big emails. So I consider using
>> BlobMessages for storing the MimeMessage out of the band. So is there
>> any example in sending a BlobMessage via ProducerTemplate ?
>>
>
> By out of band I assume you mean the claim check EIP?
> http://camel.apache.org/claim-check.html
>
> And BlobMessage is it the AMQ type?
> org.apache.activemq.BlobMessage
>
> I recon you need to grab the InputStream from the BlobMessage to be
> used as the body to be send using ProducerTemplate.
>
>
>>
>> Thx,
>> Norman
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Re: Example of using BlobMessage

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Mar 2, 2010 at 8:42 AM, Norman Maurer <no...@apache.org> wrote:
> Hi all,
>
> we just switched to using Camel + Activemq for message routing and
> spooling in JAMES. At the moment we store the whole MimeMessage as a
> byte array in the payload of the Exchange. This is super inefficient
> because of the possibility of very big emails. So I consider using
> BlobMessages for storing the MimeMessage out of the band. So is there
> any example in sending a BlobMessage via ProducerTemplate ?
>

By out of band I assume you mean the claim check EIP?
http://camel.apache.org/claim-check.html

And BlobMessage is it the AMQ type?
org.apache.activemq.BlobMessage

I recon you need to grab the InputStream from the BlobMessage to be
used as the body to be send using ProducerTemplate.


>
> Thx,
> Norman
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus