Class List Method List File List

# Class: VertxRabbitmq::RabbitMQClient

Inherits:
  Object
  - Object
  - VertxRabbitmq::RabbitMQClient
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb

## Constant Summary

@@j_api_type =

      Object.new

## Class Method Summary (collapse)

- + (Boolean) accept?(obj)
- + (::VertxRabbitmq::RabbitMQClient) create(vertx = nil, config = nil)
  Create and return a client.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)

## Instance Method Summary (collapse)

- - (void) basic_ack(deliveryTag = nil, multiple = nil) { ... }
  Acknowledge one or several received messages.
- - (void) basic_cancel(consumerTag = nil) { ... }
  Instead of using this and #basic_consume method, #basic_consumer and VertxRabbitmq::RabbitMQConsumer#cancel instead This method should be called when you want to cancel consumption from a queue, started by calling #basic_consume.
- - (void) basic_consume(queue = nil, address = nil, autoAck = nil, resultHandler = nil) { ... }
  Use #basic_consumer instead Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag and error handler.
- - (void) basic_consumer(queue = nil, options = nil) { ... }
  Create a consumer with the given options.
- - (void) basic_get(queue = nil, autoAck = nil) { ... }
  Retrieve a message from a queue using AMQP.Basic.Get.
- - (void) basic_nack(deliveryTag = nil, multiple = nil, requeue = nil) { ... }
  Reject one or several received messages.
- - (void) basic_publish(exchange = nil, routingKey = nil, message = nil) { ... }
  Publish a message.
- - (void) basic_qos(param_1 = nil, param_2 = nil, param_3 = nil)
  Request specific "quality of service" settings.
- - (void) confirm_select { ... }
  Enables publisher acknowledgements on this channel.
- - (true, false) connected?
  Check if a connection is open.
- - (void) exchange_bind(destination = nil, source = nil, routingKey = nil) { ... }
  Bind an exchange to an exchange.
- - (void) exchange_declare(exchange = nil, type = nil, durable = nil, autoDelete = nil, config = nil) { ... }
  Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.
- - (void) exchange_delete(exchange = nil) { ... }
  Delete an exchange, without regard for whether it is in use or not.
- - (void) exchange_unbind(destination = nil, source = nil, routingKey = nil) { ... }
  Unbind an exchange from an exchange.
- - (void) message_count(queue = nil) { ... }
  Returns the number of messages in a queue ready to be delivered.
- - (true, false) open_channel?
  Check if a channel is open.
- - (void) queue_bind(queue = nil, exchange = nil, routingKey = nil) { ... }
  Bind a queue to an exchange.
- - (void) queue_declare(queue = nil, durable = nil, exclusive = nil, autoDelete = nil, config = nil) { ... }
  Declare a queue with config options.
- - (void) queue_declare_auto { ... }
  Actively declare a server-named exclusive, autodelete, non-durable queue.
- - (void) queue_delete(queue = nil) { ... }
  Delete a queue, without regard for whether it is in use or has messages on it.
- - (void) queue_delete_if(queue = nil, ifUnused = nil, ifEmpty = nil) { ... }
  Delete a queue.
- - (void) start { ... }
  Start the rabbitMQ client.
- - (void) stop { ... }
  Stop the rabbitMQ client.
- - (void) wait_for_confirms(timeout = nil) { ... }
  Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses.

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

    18
    19
    20
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 18

    def @@j_api_type.accept?(obj)
      obj.class == RabbitMQClient
    end

### + (`::VertxRabbitmq::RabbitMQClient`) create(vertx = nil, config = nil)

Create and return a client.

Parameters:

- vertx (`::Vertx::Vertx`) (defaults to: `nil`) —
  the vertx instance
- config (`Hash`) (defaults to: `nil`) —
  the client config

Returns:

- (`::VertxRabbitmq::RabbitMQClient`) —
  the client

Raises:

- (`ArgumentError`)

    37
    38
    39
    40
    41
    42
    43
    44
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 37

    def self.create(vertx=nil,config=nil)
      if vertx.class.method_defined?(:j_del) && !block_given? && config == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxRabbitmq::RabbitMQClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxRabbitmq::RabbitMQClient)
      elsif vertx.class.method_defined?(:j_del) && config.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxRabbitmq::RabbitMQClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxRabbitmq::RabbitMQOptions.java_class]).call(vertx.j_del,Java::IoVertxRabbitmq::RabbitMQOptions.new(::Vertx::Util::Utils.to_json_object(config))),::VertxRabbitmq::RabbitMQClient)
      end
      raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{config})"
    end

### + (`Object`) j_api_type

    27
    28
    29
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 27

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    30
    31
    32
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 30

    def self.j_class
      Java::IoVertxRabbitmq::RabbitMQClient.java_class
    end

### + (`Object`) unwrap(obj)

    24
    25
    26
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 24

    def @@j_api_type.unwrap(obj)
      obj.j_del
    end

### + (`Object`) wrap(obj)

    21
    22
    23
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 21

    def @@j_api_type.wrap(obj)
      RabbitMQClient.new(obj)
    end

## Instance Method Details

### - (`void`) basic_ack(deliveryTag = nil, multiple = nil) { ... }

This method returns an undefined value.

Acknowledge one or several received messages. Supply the deliveryTag from the AMQP.Basic.GetOk or AMQP.Basic.Deliver method containing the received message being acknowledged.

Parameters:

- deliveryTag (`Fixnum`) (defaults to: `nil`)
- multiple (`true`, `false`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    51
    52
    53
    54
    55
    56
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 51

    def basic_ack(deliveryTag=nil,multiple=nil)
      if deliveryTag.class == Fixnum && (multiple.class == TrueClass || multiple.class == FalseClass) && block_given?
        return @j_del.java_method(:basicAck, [Java::long.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(deliveryTag,multiple,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_ack(#{deliveryTag},#{multiple})"
    end

### - (`void`) basic_cancel(consumerTag = nil) { ... }

This method returns an undefined value.

Instead of using this and #basic_consume method, #basic_consumer and VertxRabbitmq::RabbitMQConsumer#cancel instead

This method should be called when you want to cancel consumption from a queue, started by calling #basic_consume.

Parameters:

- consumerTag (`String`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    107
    108
    109
    110
    111
    112
    113
    114
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 107

    def basic_cancel(consumerTag=nil)
      if consumerTag.class == String && !block_given?
        return @j_del.java_method(:basicCancel, [Java::java.lang.String.java_class]).call(consumerTag)
      elsif consumerTag.class == String && block_given?
        return @j_del.java_method(:basicCancel, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(consumerTag,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_cancel(#{consumerTag})"
    end

### - (`void`) basic_consume(queue = nil, address = nil, autoAck = nil, resultHandler = nil) { ... }

This method returns an undefined value.

Use #basic_consumer instead

Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag and error handler

Parameters:

- queue (`String`) (defaults to: `nil`)
- address (`String`) (defaults to: `nil`)
- autoAck (`true`, `false`) (defaults to: `nil`)
- resultHandler (`Proc`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 89

    def basic_consume(queue=nil,address=nil,autoAck=nil,resultHandler=nil)
      if queue.class == String && address.class == String && block_given? && autoAck == nil && resultHandler == nil
        return @j_del.java_method(:basicConsume, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,address,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      elsif queue.class == String && address.class == String && (autoAck.class == TrueClass || autoAck.class == FalseClass) && block_given? && resultHandler == nil
        return @j_del.java_method(:basicConsume, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,address,autoAck,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      elsif queue.class == String && address.class == String && (autoAck.class == TrueClass || autoAck.class == FalseClass) && resultHandler.class == Proc && block_given?
        return @j_del.java_method(:basicConsume, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,address,autoAck,(Proc.new { |ar| resultHandler.call(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }),(Proc.new { |event| yield(::Vertx::Util::Utils.from_throwable(event)) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_consume(#{queue},#{address},#{autoAck},#{resultHandler})"
    end

### - (`void`) basic_consumer(queue = nil, options = nil) { ... }

This method returns an undefined value.

Create a consumer with the given `options`.

Parameters:

- queue (`String`) (defaults to: `nil`) —
  the name of a queue
- options (`Hash`) (defaults to: `nil`) —
  options for queue

Yields:

- a handler through which you can find out the operation status; if the operation succeeds you can begin to receive messages through an instance of VertxRabbitmq::RabbitMQConsumer

Raises:

- (`ArgumentError`)

    120
    121
    122
    123
    124
    125
    126
    127
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 120

    def basic_consumer(queue=nil,options=nil)
      if queue.class == String && block_given? && options == nil
        return @j_del.java_method(:basicConsumer, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxRabbitmq::RabbitMQConsumer) : nil) }))
      elsif queue.class == String && options.class == Hash && block_given?
        return @j_del.java_method(:basicConsumer, [Java::java.lang.String.java_class,Java::IoVertxRabbitmq::QueueOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,Java::IoVertxRabbitmq::QueueOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxRabbitmq::RabbitMQConsumer) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_consumer(#{queue},#{options})"
    end

### - (`void`) basic_get(queue = nil, autoAck = nil) { ... }

This method returns an undefined value.

Retrieve a message from a queue using AMQP.Basic.Get

Parameters:

- queue (`String`) (defaults to: `nil`)
- autoAck (`true`, `false`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    74
    75
    76
    77
    78
    79
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 74

    def basic_get(queue=nil,autoAck=nil)
      if queue.class == String && (autoAck.class == TrueClass || autoAck.class == FalseClass) && block_given?
        return @j_del.java_method(:basicGet, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,autoAck,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_get(#{queue},#{autoAck})"
    end

### - (`void`) basic_nack(deliveryTag = nil, multiple = nil, requeue = nil) { ... }

This method returns an undefined value.

Reject one or several received messages.

Parameters:

- deliveryTag (`Fixnum`) (defaults to: `nil`)
- multiple (`true`, `false`) (defaults to: `nil`)
- requeue (`true`, `false`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    63
    64
    65
    66
    67
    68
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 63

    def basic_nack(deliveryTag=nil,multiple=nil,requeue=nil)
      if deliveryTag.class == Fixnum && (multiple.class == TrueClass || multiple.class == FalseClass) && (requeue.class == TrueClass || requeue.class == FalseClass) && block_given?
        return @j_del.java_method(:basicNack, [Java::long.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(deliveryTag,multiple,requeue,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_nack(#{deliveryTag},#{multiple},#{requeue})"
    end

### - (`void`) basic_publish(exchange = nil, routingKey = nil, message = nil) { ... }

This method returns an undefined value.

Publish a message. Publishing to a non-existent exchange will result in a channel-level protocol exception, which closes the channel. Invocations of Channel#basicPublish will eventually block if a resource-driven alarm is in effect.

Parameters:

- exchange (`String`) (defaults to: `nil`)
- routingKey (`String`) (defaults to: `nil`)
- message (`Hash{String => Object}`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    135
    136
    137
    138
    139
    140
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 135

    def basic_publish(exchange=nil,routingKey=nil,message=nil)
      if exchange.class == String && routingKey.class == String && message.class == Hash && block_given?
        return @j_del.java_method(:basicPublish, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(exchange,routingKey,::Vertx::Util::Utils.to_json_object(message),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_publish(#{exchange},#{routingKey},#{message})"
    end

### - (`void`) basicQos(prefetchCount, resultHandler) { ... } - (`void`) basicQos(prefetchCount, global, resultHandler) { ... } - (`void`) basicQos(prefetchSize, prefetchCount, global, resultHandler) { ... }

This method returns an undefined value.

Request specific "quality of service" settings. These settings impose limits on the amount of data the server will deliver to consumers before requiring acknowledgements. Thus they provide a means of consumer-initiated flow control.

Overloads:

- - (`void`) basicQos(prefetchCount, resultHandler) { ... }

  Parameters:

  - prefetchCount (`Fixnum`) —
    maximum number of messages that the server will deliver, 0 if unlimited

  Yields:

  - handler called when operation is done with a result of the operation
- - (`void`) basicQos(prefetchCount, global, resultHandler) { ... }

  Parameters:

  - prefetchCount (`Fixnum`) —
    maximum number of messages that the server will deliver, 0 if unlimited
  - global (`true`, `false`) —
    true if the settings should be applied to the entire channel rather than each consumer

  Yields:

  - handler called when operation is done with a result of the operation
- - (`void`) basicQos(prefetchSize, prefetchCount, global, resultHandler) { ... }

  Parameters:

  - prefetchSize (`Fixnum`) —
    maximum amount of content (measured in octets) that the server will deliver, 0 if unlimited
  - prefetchCount (`Fixnum`) —
    maximum number of messages that the server will deliver, 0 if unlimited
  - global (`true`, `false`) —
    true if the settings should be applied to the entire channel rather than each consumer

  Yields:

  - handler called when operation is done with a result of the operation

Raises:

- (`ArgumentError`)

    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 181

    def basic_qos(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == Fixnum && block_given? && param_2 == nil && param_3 == nil
        return @j_del.java_method(:basicQos, [Java::int.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      elsif param_1.class == Fixnum && (param_2.class == TrueClass || param_2.class == FalseClass) && block_given? && param_3 == nil
        return @j_del.java_method(:basicQos, [Java::int.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,param_2,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      elsif param_1.class == Fixnum && param_2.class == Fixnum && (param_3.class == TrueClass || param_3.class == FalseClass) && block_given?
        return @j_del.java_method(:basicQos, [Java::int.java_class,Java::int.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,param_2,param_3,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_qos(#{param_1},#{param_2},#{param_3})"
    end

### - (`void`) confirm_select { ... }

This method returns an undefined value.

Enables publisher acknowledgements on this channel. Can be called once during client initialisation. Calls to basicPublish() will have to be confirmed.

Yields:

Raises:

- (`ArgumentError`)

    145
    146
    147
    148
    149
    150
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 145

    def confirm_select
      if block_given?
        return @j_del.java_method(:confirmSelect, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling confirm_select()"
    end

### - (`true`, `false`) connected?

Check if a connection is open

Returns:

- (`true`, `false`) —
  true when the connection is open, false otherwise

Raises:

- (`ArgumentError`)

    330
    331
    332
    333
    334
    335
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 330

    def connected?
      if !block_given?
        return @j_del.java_method(:isConnected, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling connected?()"
    end

### - (`void`) exchange_bind(destination = nil, source = nil, routingKey = nil) { ... }

This method returns an undefined value.

Bind an exchange to an exchange.

Parameters:

- destination (`String`) (defaults to: `nil`)
- source (`String`) (defaults to: `nil`)
- routingKey (`String`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    223
    224
    225
    226
    227
    228
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 223

    def exchange_bind(destination=nil,source=nil,routingKey=nil)
      if destination.class == String && source.class == String && routingKey.class == String && block_given?
        return @j_del.java_method(:exchangeBind, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(destination,source,routingKey,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling exchange_bind(#{destination},#{source},#{routingKey})"
    end

### - (`void`) exchange_declare(exchange = nil, type = nil, durable = nil, autoDelete = nil, config = nil) { ... }

This method returns an undefined value.

Declare an exchange with additional parameters such as dead lettering, an alternate exchange or TTL.

Parameters:

- exchange (`String`) (defaults to: `nil`)
- type (`String`) (defaults to: `nil`)
- durable (`true`, `false`) (defaults to: `nil`)
- autoDelete (`true`, `false`) (defaults to: `nil`)
- config (`Hash{String => Object}`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    199
    200
    201
    202
    203
    204
    205
    206
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 199

    def exchange_declare(exchange=nil,type=nil,durable=nil,autoDelete=nil,config=nil)
      if exchange.class == String && type.class == String && (durable.class == TrueClass || durable.class == FalseClass) && (autoDelete.class == TrueClass || autoDelete.class == FalseClass) && block_given? && config == nil
        return @j_del.java_method(:exchangeDeclare, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(exchange,type,durable,autoDelete,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      elsif exchange.class == String && type.class == String && (durable.class == TrueClass || durable.class == FalseClass) && (autoDelete.class == TrueClass || autoDelete.class == FalseClass) && config.class == Hash && block_given?
        return @j_del.java_method(:exchangeDeclare, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(exchange,type,durable,autoDelete,::Vertx::Util::Utils.to_json_object(config),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling exchange_declare(#{exchange},#{type},#{durable},#{autoDelete},#{config})"
    end

### - (`void`) exchange_delete(exchange = nil) { ... }

This method returns an undefined value.

Delete an exchange, without regard for whether it is in use or not.

Parameters:

- exchange (`String`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    211
    212
    213
    214
    215
    216
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 211

    def exchange_delete(exchange=nil)
      if exchange.class == String && block_given?
        return @j_del.java_method(:exchangeDelete, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(exchange,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling exchange_delete(#{exchange})"
    end

### - (`void`) exchange_unbind(destination = nil, source = nil, routingKey = nil) { ... }

This method returns an undefined value.

Unbind an exchange from an exchange.

Parameters:

- destination (`String`) (defaults to: `nil`)
- source (`String`) (defaults to: `nil`)
- routingKey (`String`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    235
    236
    237
    238
    239
    240
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 235

    def exchange_unbind(destination=nil,source=nil,routingKey=nil)
      if destination.class == String && source.class == String && routingKey.class == String && block_given?
        return @j_del.java_method(:exchangeUnbind, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(destination,source,routingKey,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling exchange_unbind(#{destination},#{source},#{routingKey})"
    end

### - (`void`) message_count(queue = nil) { ... }

This method returns an undefined value.

Returns the number of messages in a queue ready to be delivered.

Parameters:

- queue (`String`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    304
    305
    306
    307
    308
    309
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 304

    def message_count(queue=nil)
      if queue.class == String && block_given?
        return @j_del.java_method(:messageCount, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling message_count(#{queue})"
    end

### - (`true`, `false`) open_channel?

Check if a channel is open

Returns:

- (`true`, `false`) —
  true when the connection is open, false otherwise

Raises:

- (`ArgumentError`)

    338
    339
    340
    341
    342
    343
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 338

    def open_channel?
      if !block_given?
        return @j_del.java_method(:isOpenChannel, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling open_channel?()"
    end

### - (`void`) queue_bind(queue = nil, exchange = nil, routingKey = nil) { ... }

This method returns an undefined value.

Bind a queue to an exchange

Parameters:

- queue (`String`) (defaults to: `nil`)
- exchange (`String`) (defaults to: `nil`)
- routingKey (`String`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    294
    295
    296
    297
    298
    299
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 294

    def queue_bind(queue=nil,exchange=nil,routingKey=nil)
      if queue.class == String && exchange.class == String && routingKey.class == String && block_given?
        return @j_del.java_method(:queueBind, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,exchange,routingKey,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_bind(#{queue},#{exchange},#{routingKey})"
    end

### - (`void`) queue_declare(queue = nil, durable = nil, exclusive = nil, autoDelete = nil, config = nil) { ... }

This method returns an undefined value.

Declare a queue with config options

Parameters:

- queue (`String`) (defaults to: `nil`)
- durable (`true`, `false`) (defaults to: `nil`)
- exclusive (`true`, `false`) (defaults to: `nil`)
- autoDelete (`true`, `false`) (defaults to: `nil`)
- config (`Hash{String => Object}`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    258
    259
    260
    261
    262
    263
    264
    265
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 258

    def queue_declare(queue=nil,durable=nil,exclusive=nil,autoDelete=nil,config=nil)
      if queue.class == String && (durable.class == TrueClass || durable.class == FalseClass) && (exclusive.class == TrueClass || exclusive.class == FalseClass) && (autoDelete.class == TrueClass || autoDelete.class == FalseClass) && block_given? && config == nil
        return @j_del.java_method(:queueDeclare, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,durable,exclusive,autoDelete,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      elsif queue.class == String && (durable.class == TrueClass || durable.class == FalseClass) && (exclusive.class == TrueClass || exclusive.class == FalseClass) && (autoDelete.class == TrueClass || autoDelete.class == FalseClass) && config.class == Hash && block_given?
        return @j_del.java_method(:queueDeclare, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,durable,exclusive,autoDelete,::Vertx::Util::Utils.to_json_object(config),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_declare(#{queue},#{durable},#{exclusive},#{autoDelete},#{config})"
    end

### - (`void`) queue_declare_auto { ... }

This method returns an undefined value.

Actively declare a server-named exclusive, autodelete, non-durable queue.

Yields:

Raises:

- (`ArgumentError`)

    244
    245
    246
    247
    248
    249
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 244

    def queue_declare_auto
      if block_given?
        return @j_del.java_method(:queueDeclareAuto, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_declare_auto()"
    end

### - (`void`) queue_delete(queue = nil) { ... }

This method returns an undefined value.

Delete a queue, without regard for whether it is in use or has messages on it

Parameters:

- queue (`String`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    270
    271
    272
    273
    274
    275
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 270

    def queue_delete(queue=nil)
      if queue.class == String && block_given?
        return @j_del.java_method(:queueDelete, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_delete(#{queue})"
    end

### - (`void`) queue_delete_if(queue = nil, ifUnused = nil, ifEmpty = nil) { ... }

This method returns an undefined value.

Delete a queue

Parameters:

- queue (`String`) (defaults to: `nil`)
- ifUnused (`true`, `false`) (defaults to: `nil`)
- ifEmpty (`true`, `false`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    282
    283
    284
    285
    286
    287
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 282

    def queue_delete_if(queue=nil,ifUnused=nil,ifEmpty=nil)
      if queue.class == String && (ifUnused.class == TrueClass || ifUnused.class == FalseClass) && (ifEmpty.class == TrueClass || ifEmpty.class == FalseClass) && block_given?
        return @j_del.java_method(:queueDeleteIf, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,ifUnused,ifEmpty,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_delete_if(#{queue},#{ifUnused},#{ifEmpty})"
    end

### - (`void`) start { ... }

This method returns an undefined value.

Start the rabbitMQ client. Create the connection and the chanel.

Yields:

Raises:

- (`ArgumentError`)

    313
    314
    315
    316
    317
    318
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 313

    def start
      if block_given?
        return @j_del.java_method(:start, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling start()"
    end

### - (`void`) stop { ... }

This method returns an undefined value.

Stop the rabbitMQ client. Close the connection and its chanel.

Yields:

Raises:

- (`ArgumentError`)

    322
    323
    324
    325
    326
    327
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 322

    def stop
      if block_given?
        return @j_del.java_method(:stop, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling stop()"
    end

### - (`void`) wait_for_confirms(timeout = nil) { ... }

This method returns an undefined value.

Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. If the timeout expires a TimeoutException is thrown.

Parameters:

- timeout (`Fixnum`) (defaults to: `nil`)

Yields:

Raises:

- (`ArgumentError`)

    155
    156
    157
    158
    159
    160
    161
    162
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_client.rb', line 155

    def wait_for_confirms(timeout=nil)
      if block_given? && timeout == nil
        return @j_del.java_method(:waitForConfirms, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      elsif timeout.class == Fixnum && block_given?
        return @j_del.java_method(:waitForConfirms, [Java::long.java_class,Java::IoVertxCore::Handler.java_class]).call(timeout,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling wait_for_confirms(#{timeout})"
    end