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: Unable to send a file using BlobMessage via HTTP transport
Date Mon, 31 Dec 2007 17:10:40 GMT
On 31/12/2007, Mani.. <manishgupta_mca@hotmail.com> wrote:
>
> Hi,
>
> I am trying to send a file using BlobMessage over Http. But I am not able to
> read at consumer side [ Code hang here when I am trying to read
> InputStream......]
> Even getting WARN message on broker side everytime when I send a file:
>
> WARN  ManagedTransportConnection     - Failed to register MBean:
> org.apache.activemq:BrokerName=localhost,Type=Connection,ConnectorName=http,ViewType=address,Name=blockingQueue

How are you creating the broker?


> Code at producer side:
> ActiveMQSession mSession = (ActiveMQSession) session;
> InputStream in = new FileInputStream("C:/file.txt");
> BlobMessage message = mSession.createBlobMessage(in);
> producer.send(message);
>
> Code at consumer side:
> if (message instanceof BlobMessage) {
> try {
>         bMsg = (BlobMessage) message;
>         InputStream in = bMsg.getInputStream();
>         //Code hang here when I am trying to read InputStream......

What does the URL look like on the BlobMessage?


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

Open Source Integration
http://open.iona.com

Mime
View raw message