lib/fluent/plugin/in_sqs.rb in fluent-plugin-aws-sqs-1.0.17 vs lib/fluent/plugin/in_sqs.rb in fluent-plugin-aws-sqs-1.0.18
- old
+ new
@@ -59,12 +59,12 @@
def run
queue.receive_messages(
max_number_of_messages: @max_number_of_messages,
wait_time_seconds: @wait_time_seconds,
visibility_timeout: @visibility_timeout,
- attribute_names: ["All"], # Receive all available built-in message attributes.
- message_attribute_names: ['Component', 'component'] # Receive any custom message attributes.
+ attribute_names: ['All'], # Receive all available built-in message attributes.
+ message_attribute_names: ['All'] # Receive any custom message attributes.
).each do |message|
record = parse_message(message)
message.delete if @delete_message
@@ -80,10 +80,12 @@
'body' => message.body.to_s,
'receipt_handle' => message.receipt_handle.to_s,
'message_id' => message.message_id.to_s,
'md5_of_body' => message.md5_of_body.to_s,
'queue_url' => message.queue_url.to_s,
- 'all_obj' => message.attributes.to_s
+ 'all_obj' => message.attributes.to_s,
+ 'all_obj2' => message.message_attributes.to_s,
+ 'all_obj3' => message.message_attributes["String"].to_s
}
if @attribute_name_to_extract.to_s.strip.length > 0
print message.attributes[@attribute_name_to_extract].to_s
print message.attributes['Component'].to_s