78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/march_hare/metadata.rb', line 78
def self.build_properties_from(props = {})
builder = AMQP::BasicProperties::Builder.new
builder.content_type(props[:content_type]).
content_encoding(props[:content_encoding]).
(props[:headers]).
delivery_mode(props[:persistent] ? 2 : 1).
priority(props[:priority]).
correlation_id(props[:correlation_id]).
reply_to(props[:reply_to]).
expiration(if props[:expiration] then props[:expiration].to_s end).
message_id(props[:message_id]).
timestamp(props[:timestamp]).
type(props[:type]).
user_id(props[:user_id]).
app_id(props[:app_id]).
cluster_id(props[:cluster_id]).
build
end
|