You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by tianqio <ch...@nlsde.buaa.edu.cn> on 2006/09/15 08:57:30 UTC

implement autoresume file sending in activemq?

what can I do to implement this ? I  think  I  can maintain the connection
and destination in client, and get the outputstream if resume is acted.But I
do not have a try,I do not know how dose the server handle stream msg ,so 
I can't predict the actually behavior of the server. any suggestion?
especially whether there exists some API that I can judge a new msg or a
resume msg from the  server?
-- 
View this message in context: http://www.nabble.com/implement-autoresume-file-sending-in-activemq--tf2275804.html#a6320181
Sent from the ActiveMQ - Dev forum at Nabble.com.


Re: implement autoresume file sending in activemq?

Posted by James Strachan <ja...@gmail.com>.
If you are using auto-reconnection, then I don't think you should need
to do anything particular to re-resume things on a reconnection. So
just use the failover: transport to connect to the broker and use JMS
streams

http://incubator.apache.org/activemq/how-can-i-support-auto-reconnection.html
http://incubator.apache.org/activemq/jms-streams.html

On 9/15/06, tianqio <ch...@nlsde.buaa.edu.cn> wrote:
>
> what can I do to implement this ? I  think  I  can maintain the connection
> and destination in client, and get the outputstream if resume is acted.But I
> do not have a try,I do not know how dose the server handle stream msg ,so
> I can't predict the actually behavior of the server. any suggestion?
> especially whether there exists some API that I can judge a new msg or a
> resume msg from the  server?
> --
> View this message in context: http://www.nabble.com/implement-autoresume-file-sending-in-activemq--tf2275804.html#a6320181
> Sent from the ActiveMQ - Dev forum at Nabble.com.
>
>


-- 

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

Re: implement autoresume file sending in activemq?

Posted by tianqio <ch...@nlsde.buaa.edu.cn>.
I have met another probelm: if I interrupt the server while sending file, no
affection on sender.but when I try to receive the file, I encounted an
exception, it says
  java.io.IOException: Received an unexpected message: expected ID: 264 but
was: 265 for   message.

thanks for suggestion.

James.Strachan wrote:
> 
> 
> Currently we have no solution to automatically re-start the client if
> it fails midway through.
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/implement-autoresume-file-sending-in-activemq--tf2275804.html#a6323545
Sent from the ActiveMQ - Dev forum at Nabble.com.


Re: implement autoresume file sending in activemq?

Posted by James Strachan <ja...@gmail.com>.
On 9/15/06, tianqio <ch...@nlsde.buaa.edu.cn> wrote:
>
>
> yes!  I just have a try,it is. thanks.
> but if I just keep a connection and dose nothing ,shut down server will shut
> down the client with no  exception.

Its your call - if you want, failover can keep trying to reconnect for
a period of time then throw an exception and fail - or you can keep
auto-reconnecting for ever if you prefer.

>  this is the test I have done before. so
> I thought  you was misunderstanding me. sorry!
>
> but how could I do if the client is shut down? no way or do it myself using
> other technology?

Currently we have no solution to automatically re-start the client if
it fails midway through.

-- 

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

Re: implement autoresume file sending in activemq?

Posted by tianqio <ch...@nlsde.buaa.edu.cn>.

yes!  I just have a try,it is. thanks.
but if I just keep a connection and dose nothing ,shut down server will shut
down the client with no  exception. this is the test I have done before. so
I thought  you was misunderstanding me. sorry!

but how could I do if the client is shut down? no way or do it myself using
other technology?
thanks to any suggestion.


James.Strachan wrote:
> 
> The failover: transport does that part for you.
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/implement-autoresume-file-sending-in-activemq--tf2275804.html#a6323251
Sent from the ActiveMQ - Dev forum at Nabble.com.


Re: implement autoresume file sending in activemq?

Posted by James Strachan <ja...@gmail.com>.
On 9/15/06, tianqio <ch...@nlsde.buaa.edu.cn> wrote:
>
> thanks for reply.
> but I think there is a misunderstanding. my problem is the server is shut
> down while a client is  sending a file using stream message, how could the
> client resume the sending?

The failover: transport does that part for you.

-- 

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

Re: implement autoresume file sending in activemq?

Posted by tianqio <ch...@nlsde.buaa.edu.cn>.
thanks for reply.
but I think there is a misunderstanding. my problem is the server is shut
down while a client is  sending a file using stream message, how could the
client resume the sending? the definition of 'resume' here is just send the
remained content of the file when the server is up again.

thanks again!
-- 
View this message in context: http://www.nabble.com/implement-autoresume-file-sending-in-activemq--tf2275804.html#a6322879
Sent from the ActiveMQ - Dev forum at Nabble.com.