Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-1814

core/terminus.rb:239:in `block in apply': undefined method[s ...] for #<Qpid::Proton::Terminus: ...> (NoMethodError)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-j-0.22.0
    • proton-c-0.22.0
    • ruby-binding
    • None

    Description

      bin/cli-proton-ruby-receiver -c 1 --log-msgs dict --broker amqp://127.0.0.1:5672/lala --log-msgs dict
      /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/core/terminus.rb:239:in `block in apply': undefined method `filter=' for #<Qpid::Proton::Terminus: address="lala" dynamic?=false> (NoMethodError)
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/core/terminus.rb:231:in `each_pair'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/core/terminus.rb:231:in `apply'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/core/receiver.rb:51:in `open'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/core/session.rb:117:in `open_receiver'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/core/connection.rb:217:in `open_receiver'
      	from /home/jdanek/Work/repos/cli-proton-ruby/lib/handlers/receiver_handler.rb:102:in `on_container_start'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/handler/adapter.rb:74:in `forward'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/handler/messaging_adapter.rb:27:in `delegate'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/handler/messaging_adapter.rb:38:in `on_container_start'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/core/container.rb:144:in `run_one'
      	from /home/jdanek/.gem/ruby/2.5.0/gems/qpid_proton-0.22.0/lib/core/container.rb:347:in `run'
      	from /home/jdanek/Work/repos/cli-proton-ruby/lib/receiver_client.rb:48:in `initialize'
      	from /home/jdanek/Work/repos/cli-proton-ruby/bin/cli-proton-ruby-receiver:21:in `new'
      	from /home/jdanek/Work/repos/cli-proton-ruby/bin/cli-proton-ruby-receiver:21:in `<top (required)>'
      	from -e:1:in `load'
      	from -e:1:in `<main>'
      
      Process finished with exit code 1
      

      After investigation of the method Qpid::Proton::Terminus#apply at qpid_proton-0.22.0/lib/core/terminus.rb:226

          def apply(opts=nil)
            return unless opts
            if opts.is_a? String      # Shorthand for address
              self.address = opts
            else
              opts.each_pair do |k,v|
                case k
                when :address then self.address = v
                when :dynamic then self.dynamic = !!v
                when :distribution_mode then self.distribution_mode = v
                when :durability_mode then self.durability_mode = v
                when :timeout then self.timeout = v
                when :expiry_policy then self.expiry_policy = v
                when :filter then self.filter = v
                when :capabilities then self.capabilities = v
                end
              end
            end
          end
      

      I figure there are these three accessors missing

      Getter:

      undefined method `dynamic' for #<Qpid::Proton::Terminus: address="lala" dynamic?=false>
      

      Setters:

      undefined method `filter=' for #<Qpid::Proton::Terminus: address="lala" dynamic?=false>
      undefined method `capabilities=' for #<Qpid::Proton::Terminus: address="lala" dynamic?=false>
      

      Attachments

        Activity

          People

            aconway Alan Conway
            jdanek Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: