Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-1017

Wrong error message when default destination for producer is not specified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 1.5.4, 2.0.0
    • Broker
    • None
    • Patch

    Description

      When producer is created without default destination roducer = session.createProducer(null) and message is sent also without specifiing desination producer.send(message), the following exception is thrown

          Exception in thread "main" java.lang.UnsupportedOperationException: Cannot specify destination if producer has a default destination
                  at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.checkDefaultDestination(ActiveMQMessageProducer.java:339)
                  at org.apache.activemq.artemis.jms.client.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:190)
                  ...
      

      The error message in the exception is clearly wrong.

      Attachments

        Issue Links

          Activity

            People

              clebertsuconic Clebert Suconic
              jdanek Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: