Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2450

TCP transport silently ignores java.net.SocketTimeoutException exceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 4.1.2, 5.3.0
    • 5.x
    • Transport
    • None

    Description

      When a client is configured with a soTimeout query on a connection URI, the exception gets caught and ignored inside the main TcpTransport class. From what I can tell this has existed since 4.x. I'm not 100% sure if this is the intended behavior but in our particular use case we are expecting the socket to be closed after a period of no socket activity and reconnect again using the failover transport logic. In my opinion it makes sense to throw this exception out of the transport in the case where a slow broker may be taking too long to service a request. I've narrowed down the offending code to the source file org.apache.activemq.transport.tcp.TcpTransport@204.

      Attachments

        1. SocketTimeoutTest.java
          2 kB
          Trevor Pounds

        Activity

          People

            Unassigned Unassigned
            tpounds Trevor Pounds
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: