lib/rabbit/publishing/message.rb in rabbit_messaging-0.7.1 vs lib/rabbit/publishing/message.rb in rabbit_messaging-0.8.1

- old
+ new

@@ -4,17 +4,18 @@ module Rabbit::Publishing class Message include Tainbox - attribute :routing_key, String - attribute :event, String - attribute :data, default: {} - attribute :exchange_name, default: [] + attribute :routing_key, String + attribute :event, String + attribute :data, default: {} + attribute :exchange_name, default: [] attribute :confirm_select, default: true - attribute :realtime, default: false + attribute :realtime, default: false attribute :headers + attribute :message_id alias_method :confirm_select?, :confirm_select alias_method :realtime?, :realtime def to_hash @@ -39,9 +40,10 @@ persistent: true, type: event, content_type: "application/json", app_id: Rabbit.config.app_name, headers: headers, + message_id: message_id, } [JSON.dump(data), real_exchange_name, routing_key.to_s, options] end