Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 507538

Summary: method exchange_declare is missing in ruby qpid session class
Product: Red Hat Enterprise MRG Reporter: Martin Kudlej <mkudlej>
Component: qpid-sdkAssignee: messaging-bugs <messaging-bugs>
Status: CLOSED ERRATA QA Contact: Frantisek Reznicek <freznice>
Severity: low Docs Contact:
Priority: low    
Version: 1.1.1CC: esammons, freznice, gsim, rafaels
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 15:58:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Kudlej 2009-06-23 08:44:21 UTC
I try to write ruby test client and I find that session
hasn't method called exchange_declare like python version does.
I'm using ruby-qpid-0.4.749380-2.el5, but I cannot find it in svn
revision 787585 too. Am I doing something wrong or is a bug?

Test client:

require 'qpid'

# define parameters
# -------------------------------------------------------------------------
options = {
  :broker_host =>"127.0.0.1",
  :broker_port => 5672,
  :auth_user => "guest",
  :auth_pass => "guest",
  :exchange_name => "test-name",
  :exchange_type => "topic",
  :exchange_durable => false,
  :exchange_auto_delete => false,
}

 #  Create a socket & connection.
 # -------------------------------------------------------------------------
begin
  connection = Qpid::Connection.new(TCPSocket.new(options[:broker_host], options[:broker_port]), {:username => options[:auth_user], :password => options[:auth_pass]})

  # start connection and session
  # -----------------------------------------------------------------------
  connection.start()
  session = connection.session(name=Qpid::UUID.uuid4().to_s)
rescue Exception => ex
  raise "Cannot connect to the broker #{options[:broker_host]}:#{options[:broker_port]}. Exception name: #{ex}"
end
begin
    session.exchange_declare(exchange=options[:exchange_name],
                             durable=options[:exchange_durable],
                             auto_delete=options[:exchange_auto_delete],
                             type=options[:exchange_type],
                             arguments={})
rescue Exception => e
  session.close(timeout=10)
  puts e.backtrace.join("\n")
  raise "Cannot declare exchange[s], session.exchange_declare() exception. #{e}"
end

# close session & connection
# -------------------------------------------------------------------------
session.close(timeout=10)

Comment 1 Rafael H. Schloming 2009-06-23 13:05:49 UTC
I can confirm this is a bug. It is fixed on trunk as of svn revision 787663.

Comment 4 Frantisek Reznicek 2010-09-23 13:11:01 UTC
The exchange_declare was implemented and is functional.
Tested on RHEL 5.5 i386 / x86_64 on package:
ruby-qpid-0.7.946106-2.el5


-> VERIFIED

Comment 6 errata-xmlrpc 2010-10-14 15:58:13 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0773.html