Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-5939

missing Sender's/Receiver's get_address() method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Future
    • Component/s: Perl Client
    • Labels:
      None

      Description

      Over amqp1.0, the name for nodes starting with a '#' character is determined by the server. In this case the name assigned needs to be communicated back to the application when the attach succeeds. To handle that a new accessor - getAddress() - has been added to both Sender and Receiver.

      Perl binding shall provide these accessors. Otherwise there is no way how to determine the name assigned by the server.

      please see additional info for suggested solution and description how this issue affect our client/server example clients.

      Version-Release number of selected component (if applicable):
      perl-qpid-0.22-13

      How reproducible:
      100%

      Steps to Reproduce:
      1. create a node starting with a '#' character over amqp1.0
      2. determine the assigned name from the apllication
      3. not possible

      Actual results:
      Senders's/Receiver's get_address() api method NOT available

      Expected results:
      Senders's/Receiver's get_address() api method available

      Additional info:

      Note: this also effectively breaks the server/client example:

      1. ./server.pl localhost " {protocol:amqp1.0}

        "

      2. ./client.pl localhost " {protocol:amqp1.0}

        "
        Delete policies not supported over AMQP 1.0. at /usr/lib64/perl5/vendor_perl/qpid/messaging/Session.pm line 314.

      When we workaround this issue with the following client change:

      • "#response-queue; {create:always, delete:always}

        ");
        + "#response-queue;

        {create:always}

        ");

      then we get following error from the server:
      Link detached by peer with amqp:not-found: Node not found: df88d9b3-5f63-4be7-a942-59feae18190b#response-queue at /usr/lib64/perl5/vendor_perl/qpid/messaging/Session.pm line 246.

      This error may be fixed by providing access to the get_address() method and related client code change, ie:

      • my $responseQueue = new qpid::messaging::Address(
      • "#response-queue; {create:always, delete:always}

        ");

      • my $receiver = $session->create_receiver($responseQueue);
        + my $receiver = $session->create_receiver("#");
        + my $responseQueue = $receiver->get_address();

      ===================

      Suggested code change:
      Following change in the Sender.pm/Receiver.pm will solve the issue.

      + =pod
      +
      + =over
      +
      + =item $session = $receiver->get_address
      +
      + Returns the B<qpid::messaging::Address> instance
      +
      + =back
      +
      + =cut
      +
      + sub get_address {
      + my ($self) = @_;
      + my $impl = $self->{_impl};
      +
      + return $impl->getAddress;
      + }

        Attachments

          Activity

            People

            • Assignee:
              mcpierce Darryl Pierce
              Reporter:
              mcpierce Darryl Pierce
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: