Announcement Announcement Module
Collapse
No announcement yet.
How to configure Jms template send timeout so won't get stuck if activemq is down Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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.

      Comment

      Working...
      X