lib/rabbit/receiving/receive.rb in rabbit_messaging-1.0.0 vs lib/rabbit/receiving/receive.rb in rabbit_messaging-1.1.0
- old
+ new
@@ -26,11 +26,11 @@
)
end
def process_message
job_class
- .set(queue: queue)
+ .set(queue: queue_name, **job_configs)
.perform_later(message, message_info)
end
def call_hooks(hooks)
hooks.each do |hook_proc|
@@ -51,10 +51,18 @@
delivery_info.slice(:exchange, :routing_key),
)
end
def queue
- Rabbit::Receiving::Queue.new(message, arguments).name
+ @queue ||= Rabbit::Receiving::Queue.new(message, arguments)
+ end
+
+ def job_configs
+ queue.handler.additional_job_configs
+ end
+
+ def queue_name
+ queue.name
end
def job_class
Rabbit.config.receiving_job_class_callable&.call(
message: message,