Darryl L. Pierce created QPID-5939:
--------------------------------------
Summary: missing Sender's/Receiver's get_address() method
Key: QPID-5939
URL: https://issues.apache.org/jira/browse/QPID-5939
Project: Qpid
Issue Type: Bug
Components: Perl Client
Reporter: Darryl L. Pierce
Assignee: Darryl L. Pierce
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:
# ./server.pl localhost "{protocol:amqp1.0}"
# ./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;
+ }
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]