Skip to content

Commit

Permalink
FIX: queue_in_memory option not being passed to the backends.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxworld committed Sep 16, 2020
1 parent 60f8288 commit ec60d88
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,5 +1,7 @@
- Unrelease

- FIX: `queue_in_memory` option not being passed to the backends.

15-09-2020

- Version 3.3.2
Expand Down
16 changes: 10 additions & 6 deletions lib/message_bus.rb
Expand Up @@ -365,13 +365,17 @@ def publish(channel, data, opts = nil)
client_ids: client_ids
)

channel_opts = nil
channel_opts = {}

if opts && ((age = opts[:max_backlog_age]) || (size = opts[:max_backlog_size]))
channel_opts = {
max_backlog_size: size,
max_backlog_age: age
}
if opts
if ((age = opts[:max_backlog_age]) || (size = opts[:max_backlog_size]))
channel_opts[:max_backlog_size] = size,
channel_opts[:max_backlog_age] = age
end

if opts.has_key?(:queue_in_memory)
channel_opts[:queue_in_memory] = opts[:queue_in_memory]
end
end

encoded_channel_name = encode_channel_name(channel, site_id)
Expand Down

0 comments on commit ec60d88

Please sign in to comment.