Results 1 to 3 of 3

Thread: How to configure Jms template send timeout so won't get stuck if activemq is down

  1. #1
    Join Date
    Jul 2012
    Posts
    27

    Default How to configure Jms template send timeout so won't get stuck if activemq is down

    hi.
    When activemq is down i get stuck on jmsTemplate.convertAndSend.
    Is there a way to configure a timeout on this so i won't get stuck if activemq is down?

    currently i work around this by running this in a separated thread.
    Is there another way to do this?

    thanks

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,022

    Default

    What do you mean by "down"? What do you mean by "stuck"?

    You should get a connection exception.

    Take a thread dump (with jstack, or visualVM) to see where the thread is.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #3
    Join Date
    Jul 2012
    Posts
    27

    Default

    Quote Originally Posted by Gary Russell View Post
    What do you mean by "down"? What do you mean by "stuck"?

    You should get a connection exception.

    Take a thread dump (with jstack, or visualVM) to see where the thread is.

    [Michal]I mean that when the activemq is down, and a client sends a message - the send will get stuck until activemq raises. I found a solution, what i will do is add timeout=10000 to the Failover Transport Options:
    "timeout -1 If a send is blocked waiting on a failed connection to reconnect how long should it wait before failing the send, default is forever (-1). "
    This way, the send will end on an exception.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •