lib/basquiat/adapters/rabbitmq/message.rb in basquiat-1.3.0.pre.1 vs lib/basquiat/adapters/rabbitmq/message.rb in basquiat-1.3.0

- old
+ new

@@ -1,11 +1,15 @@ +# frozen_string_literal: true module Basquiat module Adapters class RabbitMq + # A RabbitMQ message, with it's delivery info and properties + # It's used instead of a simple hash so we can access more easily + # the properties needed for acks and requeues class Message < Basquiat::Adapters::BaseMessage attr_reader :delivery_info, :props - alias_method :di, :delivery_info + alias di delivery_info # @!attribute [r] delivery_info # @return [Hash] RabbitMQ delivery_info. # @!attribute [r] props # @return [Hash] RabbitMQ message properties, such as headers. @@ -23,9 +27,10 @@ def routing_key @routing_key || delivery_info.routing_key end # Shorthand for delivery_info.delivery_tag + # @return [String] the message's Delivery Tag def delivery_tag delivery_info.delivery_tag end end end