Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-334

Sending a message to a nonexistent queue suspends the current thread.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.5.1
    • 1.5.2, 1.6.0
    • NMS
    • None

    Description

      Code to reproduce:

      class Program
      {
      static void Main()
      {
      var factory = new ConnectionFactory(ConnectionFactory.DEFAULT_BROKER_URL);

      // This connection represents a client connection. 'clientResponseChannel' represents 'response' channel in request-response scenario.
      // The client closes connection before response will be delivered.
      IDestination clientResponseChannel = null;
      using (var clientConnection = factory.CreateConnection())
      using (var session = clientConnection.CreateSession())

      { clientConnection.Start(); clientResponseChannel = session.CreateTemporaryTopic(); }

      // This connection represents a service connection. The service tries send a message to the client
      using (var con = factory.CreateConnection())
      using (var session = con.CreateSession())

      { con.Start(); var producer = session.CreateProducer(clientResponseChannel); var msg = producer.CreateTextMessage("1"); // This line generates an exception on ActiveMQ log. producer.Send(msg); // This line suspends current thread, or - sometimes - invokes JMSException. }

      }
      }

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            siudeks SÅ‚awomir Siudek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: