march_hare 2.1.1-java → 2.1.2-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/march_hare/channel.rb +20 -6
- data/lib/march_hare/exchange.rb +24 -1
- data/lib/march_hare/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c275fc15d1a7b00ec3dc6f34a5ef50a1b0046395
|
4
|
+
data.tar.gz: 233e98ccc0ae76bda34f5b626f8a0aa231944ef7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed4664238f267016c446d8dad3f09cb45188a474a4522e3f2dc013244192ca4ba2ab331a0421a201dd37a9a10c86a85dd9e08bed1d25d3debaa1a396d0aafaac
|
7
|
+
data.tar.gz: e8f4c63cf7be9d79e19dbbde04ae16169f925d918fda728d5277148a326e58b13a83f12d1cf1b08dcf00cf9ee604b16d121e8763c9a1c1109704b2c5db206feb
|
data/lib/march_hare/channel.rb
CHANGED
@@ -400,8 +400,8 @@ module MarchHare
|
|
400
400
|
#
|
401
401
|
# @return RabbitMQ response
|
402
402
|
# @see http://rubymarchhare.info/articles/echanges.html Exchanges and Publishing guide
|
403
|
-
def exchange_declare(name, type, durable = false, auto_delete = false, arguments = nil)
|
404
|
-
@delegate.exchange_declare(name, type, durable, auto_delete, arguments)
|
403
|
+
def exchange_declare(name, type, durable = false, auto_delete = false, internal = false, arguments = nil)
|
404
|
+
@delegate.exchange_declare(name, type, durable, auto_delete, internal, arguments)
|
405
405
|
end
|
406
406
|
|
407
407
|
# Binds an exchange to another exchange using exchange.bind method (RabbitMQ extension)
|
@@ -614,10 +614,7 @@ module MarchHare
|
|
614
614
|
end
|
615
615
|
|
616
616
|
def qos(options={})
|
617
|
-
|
618
|
-
then basic_qos(options[:prefetch_count])
|
619
|
-
else basic_qos(options.fetch(:prefetch_size, 0), options.fetch(:prefetch_count, 0), options.fetch(:global, false))
|
620
|
-
end
|
617
|
+
basic_qos(options.fetch(:prefetch_count, 0))
|
621
618
|
end
|
622
619
|
|
623
620
|
# Sets how many messages will be given to consumers on this channel before they
|
@@ -630,6 +627,11 @@ module MarchHare
|
|
630
627
|
basic_qos(n)
|
631
628
|
end
|
632
629
|
|
630
|
+
# @return [Integer] Active basic.qos prefetch setting.
|
631
|
+
def prefetch
|
632
|
+
@prefetch_count || 0
|
633
|
+
end
|
634
|
+
|
633
635
|
# Acknowledges a message. Acknowledged messages are completely removed from the queue.
|
634
636
|
#
|
635
637
|
# @param [Integer] delivery_tag Delivery tag to acknowledge
|
@@ -778,6 +780,12 @@ module MarchHare
|
|
778
780
|
end
|
779
781
|
end
|
780
782
|
|
783
|
+
# @return [Boolean] true if publisher confirms are enabled for this channel
|
784
|
+
def using_publisher_confirms?
|
785
|
+
!!@confirm_mode
|
786
|
+
end
|
787
|
+
alias uses_publisher_confirms? using_publisher_confirms?
|
788
|
+
|
781
789
|
# Waits until all outstanding publisher confirms arrive.
|
782
790
|
#
|
783
791
|
# Takes an optional timeout in milliseconds. Will raise
|
@@ -808,6 +816,12 @@ module MarchHare
|
|
808
816
|
end
|
809
817
|
end
|
810
818
|
|
819
|
+
# @return [Boolean] true if transactions are enabled for this channel
|
820
|
+
def using_tx?
|
821
|
+
!!@tx_mode
|
822
|
+
end
|
823
|
+
alias uses_tx? using_tx?
|
824
|
+
|
811
825
|
# Commits a transaction
|
812
826
|
def tx_commit
|
813
827
|
converting_rjc_exceptions_to_ruby do
|
data/lib/march_hare/exchange.rb
CHANGED
@@ -28,6 +28,7 @@ module MarchHare
|
|
28
28
|
# @options opts :durable [Boolean] (false) Will the exchange be durable?
|
29
29
|
# @options opts :auto_delete [Boolean] (false) Will the exchange be auto-deleted?
|
30
30
|
# @options opts :passive [Boolean] (false) Should passive declaration be used?
|
31
|
+
# @options opts :internal [Boolean] (false) Will the exchange be internal?
|
31
32
|
#
|
32
33
|
# @see MarchHare::Channel#default_exchange
|
33
34
|
# @see MarchHare::Channel#fanout
|
@@ -136,6 +137,24 @@ module MarchHare
|
|
136
137
|
@name.empty? || @name.start_with?("amq.")
|
137
138
|
end
|
138
139
|
|
140
|
+
# @return [Boolean] true if this exchange was declared as durable (will survive broker restart).
|
141
|
+
# @api public
|
142
|
+
def durable?
|
143
|
+
!!@options[:durable]
|
144
|
+
end # durable?
|
145
|
+
|
146
|
+
# @return [Boolean] true if this exchange was declared as automatically deleted (deleted as soon as last consumer unbinds).
|
147
|
+
# @api public
|
148
|
+
def auto_delete?
|
149
|
+
!!@options[:auto_delete]
|
150
|
+
end # auto_delete?
|
151
|
+
|
152
|
+
# @return [Boolean] true if this exchange is internal (used solely for exchange-to-exchange
|
153
|
+
# bindings and cannot be published to by clients)
|
154
|
+
def internal?
|
155
|
+
!!@options[:internal]
|
156
|
+
end
|
157
|
+
|
139
158
|
# Waits until all outstanding publisher confirms on the channel
|
140
159
|
# arrive.
|
141
160
|
#
|
@@ -156,7 +175,11 @@ module MarchHare
|
|
156
175
|
unless predefined?
|
157
176
|
if @options[:passive]
|
158
177
|
then @channel.exchange_declare_passive(@name)
|
159
|
-
else @channel.exchange_declare(@name, @options[:type].to_s,
|
178
|
+
else @channel.exchange_declare(@name, @options[:type].to_s,
|
179
|
+
@options[:durable],
|
180
|
+
@options[:auto_delete],
|
181
|
+
@options[:internal],
|
182
|
+
@options[:arguments])
|
160
183
|
end
|
161
184
|
end
|
162
185
|
end
|
data/lib/march_hare/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: march_hare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Theo Hultberg
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: RabbitMQ client for JRuby built around the official RabbitMQ Java client
|
15
15
|
email:
|