active_publisher 1.3.0.pre0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +56 -0
- data/active_publisher.gemspec +1 -1
- data/lib/active_publisher/async/in_memory_adapter/async_queue.rb +1 -0
- data/lib/active_publisher/async/in_memory_adapter/consumer_thread.rb +86 -55
- data/lib/active_publisher/async/redis_adapter/consumer.rb +19 -14
- data/lib/active_publisher/async/redis_adapter/redis_multi_pop_queue.rb +3 -3
- data/lib/active_publisher/async/redis_adapter.rb +5 -3
- data/lib/active_publisher/configuration.rb +13 -2
- data/lib/active_publisher/connection.rb +23 -0
- data/lib/active_publisher/version.rb +1 -1
- data/lib/active_publisher.rb +2 -2
- metadata +13 -14
- data/.travis.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1f52f284362383d67ea86b1fd21a9bfa855e32bea6ad77c7c482fc47ece6ef09
|
4
|
+
data.tar.gz: 4b09f1fd7b793fbca7012a4f6d01c9797029529a69c7e8482c18c3af3cfeb51f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ab3dfaa3727a5e56c639aacdc12158c30fad925ea112701f48c7c9d4dcfab0028fb5c799841e8d9920ba78d83e42edb0b89fc22f4cc3f6fcdb77093937c77b0
|
7
|
+
data.tar.gz: d4a514867fea7d76fae78aff4b083bd1044aee9e775f4e57d4d72ea12429201b0089033eca3b8cf7d6544d0c5c5b027735f6e178580575f26d75bd1426429ea2
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Inspired by: http://mikebian.co/running-tests-against-multiple-ruby-versions-using-circleci/
|
2
|
+
|
3
|
+
version: 2.1
|
4
|
+
|
5
|
+
orbs:
|
6
|
+
ruby: circleci/ruby@1.1
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
test:
|
10
|
+
parallelism: 1
|
11
|
+
parameters:
|
12
|
+
ruby-image:
|
13
|
+
type: string
|
14
|
+
docker:
|
15
|
+
- image: << parameters.ruby-image >>
|
16
|
+
- image: rabbitmq
|
17
|
+
|
18
|
+
steps:
|
19
|
+
- checkout
|
20
|
+
- run:
|
21
|
+
name: install dockerize
|
22
|
+
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
|
23
|
+
environment:
|
24
|
+
DOCKERIZE_VERSION: v0.3.0
|
25
|
+
- run:
|
26
|
+
name: Wait for rabbitmq
|
27
|
+
command: dockerize -wait tcp://localhost:5672 -timeout 1m
|
28
|
+
- run:
|
29
|
+
name: Install bundler
|
30
|
+
command: gem install bundler
|
31
|
+
- run:
|
32
|
+
name: Which bundler?
|
33
|
+
command: bundle -v
|
34
|
+
- run:
|
35
|
+
name: bundle install
|
36
|
+
command: bundle install
|
37
|
+
- run:
|
38
|
+
name: rspec
|
39
|
+
command: bundle exec rspec
|
40
|
+
|
41
|
+
# strangely, there seems to be very little documentation about exactly how martix builds work.
|
42
|
+
# By defining a param inside your job definition, Circle CI will automatically spawn a job for
|
43
|
+
# unique param value passed via `matrix`. Neat!
|
44
|
+
# https://circleci.com/blog/circleci-matrix-jobs/
|
45
|
+
workflows:
|
46
|
+
build_and_test:
|
47
|
+
jobs:
|
48
|
+
- test:
|
49
|
+
matrix:
|
50
|
+
parameters:
|
51
|
+
ruby-image:
|
52
|
+
- circleci/ruby:2.5
|
53
|
+
- circleci/ruby:2.6
|
54
|
+
- circleci/ruby:2.7
|
55
|
+
- circleci/jruby:9.1
|
56
|
+
- circleci/jruby:9.2
|
data/active_publisher.gemspec
CHANGED
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency "connection_pool"
|
36
36
|
spec.add_development_dependency "fakeredis"
|
37
37
|
spec.add_development_dependency "pry"
|
38
|
-
spec.add_development_dependency "rake"
|
38
|
+
spec.add_development_dependency "rake"
|
39
39
|
spec.add_development_dependency "rspec", "~> 3.2"
|
40
40
|
end
|
@@ -76,6 +76,7 @@ module ActivePublisher
|
|
76
76
|
if !consumer.alive? || consumer_is_lagging
|
77
77
|
consumer.kill rescue nil
|
78
78
|
consumers[consumer_id] = ::ActivePublisher::Async::InMemoryAdapter::ConsumerThread.new(queue)
|
79
|
+
::ActiveSupport::Notifications.instrument "async_queue.thread_restart"
|
79
80
|
end
|
80
81
|
|
81
82
|
# Notify the current queue size.
|
@@ -2,7 +2,13 @@ module ActivePublisher
|
|
2
2
|
module Async
|
3
3
|
module InMemoryAdapter
|
4
4
|
class ConsumerThread
|
5
|
-
attr_reader :thread, :queue, :sampled_queue_size, :last_tick_at
|
5
|
+
attr_reader :channel, :flush_max, :thread, :queue, :sampled_queue_size, :last_tick_at
|
6
|
+
|
7
|
+
if ::RUBY_PLATFORM == "java"
|
8
|
+
CHANNEL_CLOSED_ERRORS = [::MarchHare::ChannelAlreadyClosed]
|
9
|
+
else
|
10
|
+
CHANNEL_CLOSED_ERRORS = [::Bunny::ChannelAlreadyClosed]
|
11
|
+
end
|
6
12
|
|
7
13
|
if ::RUBY_PLATFORM == "java"
|
8
14
|
NETWORK_ERRORS = [::MarchHare::NetworkException, ::MarchHare::ConnectionRefused,
|
@@ -21,6 +27,7 @@ module ActivePublisher
|
|
21
27
|
def initialize(listen_queue)
|
22
28
|
@queue = listen_queue
|
23
29
|
@sampled_queue_size = queue.size
|
30
|
+
@flush_max = ::ActivePublisher.configuration.messages_per_batch
|
24
31
|
|
25
32
|
update_last_tick_at
|
26
33
|
start_thread
|
@@ -45,6 +52,32 @@ module ActivePublisher
|
|
45
52
|
end
|
46
53
|
end
|
47
54
|
|
55
|
+
def cleanup_up_channel
|
56
|
+
return if channel.nil?
|
57
|
+
channel.close
|
58
|
+
rescue => error
|
59
|
+
::ActivePublisher.configuration.error_handler.call(error, {:status => "Cleaning up the channel"})
|
60
|
+
end
|
61
|
+
|
62
|
+
def handle_current_messages_on_unknown_error(current_messages)
|
63
|
+
current_messages.each do |message|
|
64
|
+
# Degrade to single message publish ... or at least attempt to
|
65
|
+
begin
|
66
|
+
::ActivePublisher.publish(message.route, message.payload, message.exchange_name, message.options)
|
67
|
+
current_messages.delete(message)
|
68
|
+
rescue *CHANNEL_CLOSED_ERRORS
|
69
|
+
# If the channel is bad, raise!
|
70
|
+
raise
|
71
|
+
rescue *PRECONDITION_ERRORS => error
|
72
|
+
# Delete messages if rabbitmq cannot declare the exchange (or somet other precondition failed).
|
73
|
+
::ActivePublisher.configuration.error_handler.call(error, {:reason => "precondition failed", :message => message})
|
74
|
+
current_messages.delete(message)
|
75
|
+
rescue => other_error
|
76
|
+
::ActivePublisher.configuration.error_handler.call(other_error, {:route => message.route, :payload => message.payload, :exchange_name => message.exchange_name, :options => message.options})
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
48
81
|
def make_channel
|
49
82
|
channel = ::ActivePublisher::Async::InMemoryAdapter::Channel.new
|
50
83
|
channel.confirm_select if ::ActivePublisher.configuration.publisher_confirms
|
@@ -57,72 +90,70 @@ module ActivePublisher
|
|
57
90
|
|
58
91
|
def start_thread
|
59
92
|
return if alive?
|
60
|
-
@thread = ::Thread.new
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
await_network_reconnect
|
83
|
-
rescue => unknown_error
|
84
|
-
::ActivePublisher.configuration.error_handler.call(unknown_error, {:number_of_messages => current_messages.size})
|
85
|
-
current_messages.each do |message|
|
86
|
-
# Degrade to single message publish ... or at least attempt to
|
87
|
-
begin
|
88
|
-
::ActivePublisher.publish(message.route, message.payload, message.exchange_name, message.options)
|
89
|
-
current_messages.delete(message)
|
90
|
-
rescue *PRECONDITION_ERRORS => error
|
91
|
-
# Delete messages if rabbitmq cannot declare the exchange (or somet other precondition failed).
|
92
|
-
::ActivePublisher.configuration.error_handler.call(error, {:reason => "precondition failed", :message => message})
|
93
|
-
current_messages.delete(message)
|
94
|
-
rescue => individual_error
|
95
|
-
::ActivePublisher.configuration.error_handler.call(individual_error, {:route => message.route, :payload => message.payload, :exchange_name => message.exchange_name, :options => message.options})
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
# TODO: Find a way to bubble this out of the thread for logging purposes.
|
100
|
-
# Reraise the error out of the publisher loop. The Supervisor will restart the consumer.
|
101
|
-
raise unknown_error
|
102
|
-
ensure
|
103
|
-
# Always requeue anything that gets stuck.
|
104
|
-
queue.concat(current_messages) if current_messages && !current_messages.empty?
|
93
|
+
@thread = ::Thread.new { start_consuming_thread }
|
94
|
+
end
|
95
|
+
|
96
|
+
def start_consuming_thread
|
97
|
+
loop do
|
98
|
+
# Sample the queue size so we don't shutdown when messages are in flight.
|
99
|
+
@sampled_queue_size = queue.size
|
100
|
+
current_messages = queue.pop_up_to(flush_max, :timeout => 0.1)
|
101
|
+
update_last_tick_at
|
102
|
+
# If the queue is empty, we should continue to update to "last_tick_at" time.
|
103
|
+
next if current_messages.nil?
|
104
|
+
|
105
|
+
@channel ||= make_channel
|
106
|
+
|
107
|
+
# We only look at active publisher messages. Everything else is dropped.
|
108
|
+
current_messages.select! { |message| message.is_a?(::ActivePublisher::Message) }
|
109
|
+
|
110
|
+
begin
|
111
|
+
# Only open a single connection for each group of messages to an exchange
|
112
|
+
current_messages.group_by(&:exchange_name).each do |exchange_name, messages|
|
113
|
+
publish_all(exchange_name, messages)
|
114
|
+
current_messages -= messages
|
105
115
|
end
|
116
|
+
rescue *CHANNEL_CLOSED_ERRORS
|
117
|
+
# If the channel is bad, raise without sending one-by-one!
|
118
|
+
raise
|
119
|
+
rescue *NETWORK_ERRORS
|
120
|
+
# Sleep because connection is down
|
121
|
+
await_network_reconnect
|
122
|
+
rescue => unknown_error
|
123
|
+
::ActivePublisher.configuration.error_handler.call(unknown_error, {:number_of_messages => current_messages.size})
|
124
|
+
|
125
|
+
# Attempt to deliver a message one-by-one. Raise if a closed channel error appears.
|
126
|
+
handle_current_messages_on_unknown_error(current_messages)
|
127
|
+
|
128
|
+
# TODO: Find a way to bubble this out of the thread for logging purposes.
|
129
|
+
# Reraise the error out of the publisher loop. The Supervisor will restart the consumer.
|
130
|
+
raise unknown_error
|
131
|
+
ensure
|
132
|
+
# Always requeue anything that gets stuck.
|
133
|
+
queue.concat(current_messages) if current_messages && !current_messages.empty?
|
106
134
|
end
|
107
135
|
end
|
136
|
+
ensure
|
137
|
+
cleanup_up_channel
|
108
138
|
end
|
109
139
|
|
110
|
-
def publish_all(
|
111
|
-
|
112
|
-
|
113
|
-
messages.
|
114
|
-
|
115
|
-
|
140
|
+
def publish_all(exchange_name, messages)
|
141
|
+
exchange = channel.topic(exchange_name)
|
142
|
+
messages.each do |message|
|
143
|
+
fail ::ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
|
144
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher", :route => message.route, :message_count => 1 do
|
116
145
|
options = ::ActivePublisher.publishing_options(message.route, message.options || {})
|
117
146
|
exchange.publish(message.payload, options)
|
118
147
|
end
|
119
|
-
wait_for_confirms(channel)
|
120
148
|
end
|
149
|
+
wait_for_confirms
|
121
150
|
end
|
122
151
|
|
123
|
-
def wait_for_confirms
|
152
|
+
def wait_for_confirms
|
124
153
|
return true unless channel.using_publisher_confirms?
|
125
|
-
|
154
|
+
::ActiveSupport::Notifications.instrument "publishes_confirmed.active_publisher" do
|
155
|
+
channel.wait_for_confirms(::ActivePublisher.configuration.publisher_confirms_timeout)
|
156
|
+
end
|
126
157
|
end
|
127
158
|
end
|
128
159
|
end
|
@@ -9,28 +9,33 @@ module ActivePublisher
|
|
9
9
|
:timeout_interval => 5, # seconds
|
10
10
|
}
|
11
11
|
|
12
|
-
attr_reader :
|
12
|
+
attr_reader :consumers, :queue, :supervisor
|
13
13
|
|
14
14
|
def initialize(redis_pool)
|
15
15
|
@queue = ::ActivePublisher::Async::RedisAdapter::RedisMultiPopQueue.new(redis_pool, ::ActivePublisher::Async::RedisAdapter::REDIS_LIST_KEY)
|
16
|
-
|
16
|
+
@consumers = {}
|
17
|
+
create_and_supervise_consumers!
|
17
18
|
end
|
18
19
|
|
19
|
-
def
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
consumer
|
26
|
-
|
20
|
+
def create_and_supervise_consumers!
|
21
|
+
::ActivePublisher.configuration.publisher_threads.times do
|
22
|
+
consumer_id = ::SecureRandom.uuid
|
23
|
+
consumers[consumer_id] = ::ActivePublisher::Async::InMemoryAdapter::ConsumerThread.new(queue)
|
24
|
+
|
25
|
+
supervisor_task = ::Concurrent::TimerTask.new(SUPERVISOR_INTERVAL) do
|
26
|
+
consumer = consumers[consumer_id]
|
27
|
+
unless consumer.alive?
|
28
|
+
consumer.kill rescue nil
|
29
|
+
consumers[consumer_id] = ::ActivePublisher::Async::InMemoryAdapter::ConsumerThread.new(queue)
|
30
|
+
::ActiveSupport::Notifications.instrument "async_queue.thread_restart"
|
31
|
+
end
|
32
|
+
|
33
|
+
# Notify the current queue size.
|
34
|
+
::ActiveSupport::Notifications.instrument "redis_async_queue_size.active_publisher", queue.size
|
27
35
|
end
|
28
36
|
|
29
|
-
|
30
|
-
::ActiveSupport::Notifications.instrument "redis_async_queue_size.active_publisher", queue.size
|
37
|
+
supervisor_task.execute
|
31
38
|
end
|
32
|
-
|
33
|
-
supervisor_task.execute
|
34
39
|
end
|
35
40
|
|
36
41
|
def size
|
@@ -77,9 +77,9 @@ module ActivePublisher
|
|
77
77
|
messages = []
|
78
78
|
multi_response = []
|
79
79
|
redis_pool.with do |redis|
|
80
|
-
multi_response = redis.multi do
|
81
|
-
|
82
|
-
|
80
|
+
multi_response = redis.multi do |pipeline|
|
81
|
+
pipeline.lrange(list_key, 0, number - 1)
|
82
|
+
pipeline.ltrim(list_key, number, -1)
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
@@ -19,7 +19,7 @@ module ActivePublisher
|
|
19
19
|
}
|
20
20
|
include ::ActivePublisher::Logging
|
21
21
|
|
22
|
-
attr_reader :async_queue, :redis_pool, :queue
|
22
|
+
attr_reader :async_queue, :flush_max, :flush_min, :redis_pool, :queue
|
23
23
|
|
24
24
|
def initialize(new_redis_pool)
|
25
25
|
logger.info "Starting redis publisher adapter"
|
@@ -27,6 +27,8 @@ module ActivePublisher
|
|
27
27
|
@redis_pool = new_redis_pool
|
28
28
|
@async_queue = ::ActivePublisher::Async::RedisAdapter::Consumer.new(redis_pool)
|
29
29
|
@queue = ::MultiOpQueue::Queue.new
|
30
|
+
@flush_max = ::ActivePublisher.configuration.messages_per_batch
|
31
|
+
@flush_min = @flush_max / 2
|
30
32
|
|
31
33
|
supervisor_task = ::Concurrent::TimerTask.new(SUPERVISOR_INTERVAL) do
|
32
34
|
queue_size = queue.size
|
@@ -41,7 +43,7 @@ module ActivePublisher
|
|
41
43
|
def publish(route, payload, exchange_name, options = {})
|
42
44
|
message = ::ActivePublisher::Message.new(route, payload, exchange_name, options)
|
43
45
|
queue << ::Marshal.dump(message)
|
44
|
-
flush_queue! if queue.size >=
|
46
|
+
flush_queue! if queue.size >= flush_min || options[:flush_queue]
|
45
47
|
|
46
48
|
nil
|
47
49
|
end
|
@@ -58,7 +60,7 @@ module ActivePublisher
|
|
58
60
|
|
59
61
|
def flush_queue!
|
60
62
|
return if queue.empty?
|
61
|
-
encoded_messages = queue.pop_up_to(
|
63
|
+
encoded_messages = queue.pop_up_to(flush_max, :timeout => 0.001)
|
62
64
|
|
63
65
|
return if encoded_messages.nil?
|
64
66
|
return unless encoded_messages.respond_to?(:each)
|
@@ -8,6 +8,7 @@ module ActivePublisher
|
|
8
8
|
:host,
|
9
9
|
:hosts,
|
10
10
|
:max_async_publisher_lag_time,
|
11
|
+
:messages_per_batch,
|
11
12
|
:network_recovery_interval,
|
12
13
|
:password,
|
13
14
|
:port,
|
@@ -37,6 +38,7 @@ module ActivePublisher
|
|
37
38
|
:host => "localhost",
|
38
39
|
:hosts => [],
|
39
40
|
:password => "guest",
|
41
|
+
:messages_per_batch => 25,
|
40
42
|
:max_async_publisher_lag_time => 10,
|
41
43
|
:network_recovery_interval => NETWORK_RECOVERY_INTERVAL,
|
42
44
|
:port => 5672,
|
@@ -65,8 +67,8 @@ module ActivePublisher
|
|
65
67
|
|
66
68
|
yaml_config = attempt_to_load_yaml_file(env)
|
67
69
|
DEFAULTS.each_pair do |key, value|
|
68
|
-
setting =
|
69
|
-
::ActivePublisher.configuration.public_send("#{key}=", setting) if
|
70
|
+
exists, setting = fetch_config_value(key, cli_options, yaml_config)
|
71
|
+
::ActivePublisher.configuration.public_send("#{key}=", setting) if exists
|
70
72
|
end
|
71
73
|
|
72
74
|
true
|
@@ -90,6 +92,15 @@ module ActivePublisher
|
|
90
92
|
end
|
91
93
|
private_class_method :attempt_to_load_yaml_file
|
92
94
|
|
95
|
+
def self.fetch_config_value(key, cli_options, yaml_config)
|
96
|
+
return [true, cli_options[key]] if cli_options.key?(key)
|
97
|
+
return [true, cli_options[key.to_s]] if cli_options.key?(key.to_s)
|
98
|
+
return [true, yaml_config[key]] if yaml_config.key?(key)
|
99
|
+
return [true, yaml_config[key.to_s]] if yaml_config.key?(key.to_s)
|
100
|
+
[false, nil]
|
101
|
+
end
|
102
|
+
private_class_method :fetch_config_value
|
103
|
+
|
93
104
|
##
|
94
105
|
# Instance Methods
|
95
106
|
#
|
@@ -31,9 +31,22 @@ module ActivePublisher
|
|
31
31
|
def self.create_connection
|
32
32
|
if ::RUBY_PLATFORM == "java"
|
33
33
|
connection = ::MarchHare.connect(connection_options)
|
34
|
+
connection.on_blocked do |reason|
|
35
|
+
on_blocked(reason)
|
36
|
+
end
|
37
|
+
connection.on_unblocked do
|
38
|
+
on_unblocked
|
39
|
+
end
|
40
|
+
connection
|
34
41
|
else
|
35
42
|
connection = ::Bunny.new(connection_options)
|
36
43
|
connection.start
|
44
|
+
connection.on_blocked do |blocked_message|
|
45
|
+
on_blocked(blocked_message.reason)
|
46
|
+
end
|
47
|
+
connection.on_unblocked do
|
48
|
+
on_unblocked
|
49
|
+
end
|
37
50
|
connection
|
38
51
|
end
|
39
52
|
end
|
@@ -58,5 +71,15 @@ module ActivePublisher
|
|
58
71
|
}
|
59
72
|
end
|
60
73
|
private_class_method :connection_options
|
74
|
+
|
75
|
+
def self.on_blocked(reason)
|
76
|
+
::ActiveSupport::Notifications.instrument("connection_blocked.active_publisher", :reason => reason)
|
77
|
+
end
|
78
|
+
private_class_method :on_blocked
|
79
|
+
|
80
|
+
def self.on_unblocked
|
81
|
+
::ActiveSupport::Notifications.instrument("connection_unblocked.active_publisher")
|
82
|
+
end
|
83
|
+
private_class_method :on_unblocked
|
61
84
|
end
|
62
85
|
end
|
data/lib/active_publisher.rb
CHANGED
@@ -36,7 +36,7 @@ module ActivePublisher
|
|
36
36
|
# @param [Hash] options hash to set message parameters (e.g. headers)
|
37
37
|
def self.publish(route, payload, exchange_name, options = {})
|
38
38
|
with_exchange(exchange_name) do |exchange|
|
39
|
-
::ActiveSupport::Notifications.instrument "message_published.active_publisher" do
|
39
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher", :route => route do
|
40
40
|
exchange.publish(payload, publishing_options(route, options))
|
41
41
|
end
|
42
42
|
end
|
@@ -52,7 +52,7 @@ module ActivePublisher
|
|
52
52
|
fail ActivePublisher::ExchangeMismatchError, "bulk publish messages must match publish_all exchange_name" if message.exchange_name != exchange_name
|
53
53
|
|
54
54
|
begin
|
55
|
-
::ActiveSupport::Notifications.instrument "message_published.active_publisher" do
|
55
|
+
::ActiveSupport::Notifications.instrument "message_published.active_publisher", :route => message.route do
|
56
56
|
exchange.publish(message.payload, publishing_options(message.route, message.options || {}))
|
57
57
|
end
|
58
58
|
rescue
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Stien
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
- Brandon Dewitt
|
10
10
|
- Devin Christensen
|
11
11
|
- Michael Ries
|
12
|
-
autorequire:
|
12
|
+
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bunny
|
@@ -144,16 +144,16 @@ dependencies:
|
|
144
144
|
name: rake
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- - "
|
147
|
+
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: '
|
149
|
+
version: '0'
|
150
150
|
type: :development
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
|
-
- - "
|
154
|
+
- - ">="
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version: '
|
156
|
+
version: '0'
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: rspec
|
159
159
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,9 +179,9 @@ executables: []
|
|
179
179
|
extensions: []
|
180
180
|
extra_rdoc_files: []
|
181
181
|
files:
|
182
|
+
- ".circleci/config.yml"
|
182
183
|
- ".gitignore"
|
183
184
|
- ".rspec"
|
184
|
-
- ".travis.yml"
|
185
185
|
- CODE_OF_CONDUCT.md
|
186
186
|
- Gemfile
|
187
187
|
- LICENSE.txt
|
@@ -208,7 +208,7 @@ homepage: https://github.com/mxenabled/active_publisher
|
|
208
208
|
licenses:
|
209
209
|
- MIT
|
210
210
|
metadata: {}
|
211
|
-
post_install_message:
|
211
|
+
post_install_message:
|
212
212
|
rdoc_options: []
|
213
213
|
require_paths:
|
214
214
|
- lib
|
@@ -219,13 +219,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
219
219
|
version: '0'
|
220
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
221
|
requirements:
|
222
|
-
- - "
|
222
|
+
- - ">="
|
223
223
|
- !ruby/object:Gem::Version
|
224
|
-
version:
|
224
|
+
version: '0'
|
225
225
|
requirements: []
|
226
|
-
|
227
|
-
|
228
|
-
signing_key:
|
226
|
+
rubygems_version: 3.0.1
|
227
|
+
signing_key:
|
229
228
|
specification_version: 4
|
230
229
|
summary: Aims to make publishing work across MRI and jRuby painless and add some nice
|
231
230
|
features like automatially publishing lifecycle events for ActiveRecord models.
|