activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: support for FileMessage?
Date Thu, 16 Nov 2006 16:42:34 GMT
On 11/16/06, Hiram Chirino <hiram@hiramchirino.com> wrote:
> I like it..  But I wonder if we can do something to handle streams out
> of band in general.  Here's a use case I'm thinking about...
>
> A big file is being posted to a servlet and the servlet wants to pass
> that input stream it's receiving to a JMS consumer somewhere in the
> back end.  So there is no actual file or URL to identify that stream
> but I want to 'pass' the stream to a consumer using JMS routing/load
> balancing.  And ideally the contents of the stream would be sent out
> band with respect to the JMS network.

Yeah. Am thinking something like

public class ActiveMQSession  {

// send a local file or stream over JMS
public FileMessage createLocalFileMessage(InputStream inputStream) {...}
public FileMessage createLocalFileMessage(File file) {..,}
public FileMessage createLocalFileMessage(URL url) {..,}


// send a remote URL over JMS
public FileMessage createRemoteFileMessage(URL url) {...}
}

i.e. from a consumers perpective they don't really need to care if its
in-band or out-of-band transfer of the content, its a decision for the
producer to decide

-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message