Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-653

Dynamic sender target not work with CR1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • A-MQ 7.0.0.CR1
    • None
      1. Unzip DynamicSenderLinkReproducer.zip
      2. Download AMQ7 CR1, create instance and run instance
      3. Run DynamicSenderLinkReproducer.exe <broker-ip>

    Description

      When AMQP client tries to attach with dynamic target, broker send detach with amqp:internal-error without more info... This is a regression it worker with previous versions and with amq6.

      frames:

          [606601270:0] <- Open{ containerId='d6eeedee-5dd1-4c03-84cb-d0aefb15b0ff', hostname='localhost', maxFrameSize=262144, channelMax=256, idleTimeOut=null, outgoingLocales=null, incomingLocales=null, offeredCapabilities=null, desiredCapabilities=null, properties=null}
          [606601270:0] -> Open{ containerId='0.0.0.0', hostname='null', maxFrameSize=4294967295, channelMax=65535, idleTimeOut=30000, outgoingLocales=null, incomingLocales=null, offeredCapabilities=[sole-connection-for-container, DELAYED_DELIVERY, SHARED-SUBS, ANONYMOUS-RELAY], desiredCapabilities=null, properties={product=apache-activemq-artemis, version=2.0.0.amq-700005-redhat-1}}
          [606601270:0] <- Begin{remoteChannel=null, nextOutgoingId=4294967293, incomingWindow=2048, outgoingWindow=2048, handleMax=4294967295, offeredCapabilities=null, desiredCapabilities=null, properties=null}
          [606601270:0] -> Begin{remoteChannel=0, nextOutgoingId=1, incomingWindow=2147483647, outgoingWindow=2147483647, handleMax=65535, offeredCapabilities=null, desiredCapabilities=null, properties=null}
          [606601270:0] <- Attach{name='sender-DynamicSenderLink', handle=0, role=SENDER, sndSettleMode=MIXED, rcvSettleMode=FIRST, source=Source{address='null', durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false, dynamicNodeProperties=null, distributionMode=null, filter=null, defaultOutcome=null, outcomes=null, capabilities=null}, target=Target{address='null', durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=true, dynamicNodeProperties=null, capabilities=null}, unsettled=null, incompleteUnsettled=false, initialDeliveryCount=0, maxMessageSize=null, offeredCapabilities=null, desiredCapabilities=null, properties=null}
          [606601270:0] -> Attach{name='sender-DynamicSenderLink', handle=0, role=RECEIVER, sndSettleMode=MIXED, rcvSettleMode=FIRST, source=Source{address='null', durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false, dynamicNodeProperties=null, distributionMode=null, filter=null, defaultOutcome=null, outcomes=null, capabilities=null}, target=null, unsettled=null, incompleteUnsettled=false, initialDeliveryCount=null, maxMessageSize=null, offeredCapabilities=null, desiredCapabilities=null, properties=null}
          [606601270:0] -> Detach{handle=0, closed=true, error=Error{condition=amqp:internal-error, description='null', info=null}}
      
      

      Code of .net reproducer

      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      using System.Threading.Tasks;
      using Amqp;
      using Amqp.Types;
      using Amqp.Framing;
      
      namespace DynamicSenderLinkReproducer
      {
          class Program
          {
              static void Main(string[] args)
              {
                  //setup frame logging
                  Trace.TraceLevel = TraceLevel.Frame;
                  Trace.TraceListener = (f, a) => Console.WriteLine(
                          DateTime.Now.ToString("[hh:mm:ss.fff]") + " " + string.Format(f, a));
      
                  string server = args.Length > 0 && !String.IsNullOrEmpty(args[0]) ? args[0] : "127.0.0.1";
                  string address = "amqp://" + server + ":5672";
                  string testName = "DynamicSenderLink";
      
                  //set up connection and session
                  Connection connection = new Connection(new Address(address));
                  Session session = new Session(connection);
      
                  string targetAddress = null;
                  OnAttached onAttached = (link, attach) =>
                  {
                      targetAddress = ((Target)attach.Target).Address;
                  };
      
                  SenderLink sender = new SenderLink(session, "sender-" + testName, new Target() { Dynamic = true }, onAttached);
                  Message message = new Message("hello");
      
                  try {
                      sender.Send(message, 60000);
                  }catch(Exception ex)
                  {
                      Console.WriteLine(ex.Message);
                  }
      
                  if (targetAddress == null)
                      Console.WriteLine("dynamic target not attached");
                  else
                  {
                      Console.WriteLine("dynamic target is attached");
                      ReceiverLink receiver = new ReceiverLink(session, "receiver-" + testName, targetAddress);
                      message = receiver.Receive();
                      receiver.Accept(message);
                      receiver.Close();
                  }
      
                  sender.Close();
                  session.Close();
                  connection.Close();
      
                  Console.ReadLine();
              }
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              rh-ee-ataylor Andy Taylor
              dkornel@redhat.com David Kornel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: