Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-1453

Adding "defaultDistribution: unavailable" overrides the regular handling of transaction coordinator link refusal

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 1.10.0
    • Component/s: None
    • Labels:
      None

      Description

       DISPATCH-802 added handling to refuse links to the transaction coordinator (which has no address, but is a specific target) if a link route to e.g a broker isnt configured (using DISPATCH-195), and help clarify the reasons for the refusal.

      DISPATCH-803 was added to provide a way for links to adressses that are otherwise unknown to be refused rather than message routed, by setting "defaultDistribution: unavailable". This functionality overrides the behaviour from DISPATCH-802, making it less clear again why a transaction usage attempt has failed.

      From a JMS client trying to create a transacted session, the failure with "defaultDistribution: unavailable" config present looks like:

      javax.jms.JMSException: No route to the destination node [condition = qd:no-route-to-dest]
       at org.apache.qpid.jms.provider.ProviderException.toJMSException(ProviderException.java:34)
       at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:80)
       at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:112)
       at org.apache.qpid.jms.JmsConnection.createResource(JmsConnection.java:698)
       at org.apache.qpid.jms.JmsLocalTransactionContext.begin(JmsLocalTransactionContext.java:140)
       at org.apache.qpid.jms.JmsSession.<init>(JmsSession.java:172)
       at org.apache.qpid.jms.JmsConnection.createSession(JmsConnection.java:316)
       at org.apache.qpid.jms.example.HelloWorld.main(HelloWorld.java:52)
      

      While without it,the router sends a more specific error condition, and so the failure normally looks like:

      javax.jms.JMSException: The router can't coordinate transactions by itself, a linkRoute to a coordinator must be configured to use transactions. [condition = amqp:precondition-failed]
       at org.apache.qpid.jms.provider.ProviderException.toJMSException(ProviderException.java:34)
       at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:80)
       at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:112)
       at org.apache.qpid.jms.JmsConnection.createResource(JmsConnection.java:698)
       at org.apache.qpid.jms.JmsLocalTransactionContext.begin(JmsLocalTransactionContext.java:140)
       at org.apache.qpid.jms.JmsSession.<init>(JmsSession.java:172)
       at org.apache.qpid.jms.JmsConnection.createSession(JmsConnection.java:316)
       at org.apache.qpid.jms.example.HelloWorld.main(HelloWorld.java:52)
      

      It would be nicer if the regular coordinator refusal error condition was sent in both cases.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmurthy Ganesh Murthy
                Reporter:
                robbie Robbie Gemmell
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: