Skip to content

Commit

Permalink
Merge pull request #82 from nasark/handle_headers_with_string_keys
Browse files Browse the repository at this point in the history
Handle headers with string keys
  • Loading branch information
agrare committed Nov 29, 2023
2 parents e4560c3 + c0f2464 commit d4817ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/manageiq/messaging/kafka/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Messaging
module Kafka
module Common
require 'manageiq/messaging/common'
require "active_support/core_ext/hash/indifferent_access"
include ManageIQ::Messaging::Common

private
Expand Down Expand Up @@ -116,7 +117,7 @@ def message_header_keys

def parse_message_headers(headers)
return [nil, nil, nil] unless headers.kind_of?(Hash)
headers.values_at(*message_header_keys)
headers.with_indifferent_access.values_at(*message_header_keys)
end

def event_header_keys
Expand All @@ -125,7 +126,7 @@ def event_header_keys

def parse_event_headers(headers)
return [nil, nil] unless headers.kind_of?(Hash)
headers.values_at(*event_header_keys)
headers.with_indifferent_access.values_at(*event_header_keys)
end
end
end
Expand Down

0 comments on commit d4817ea

Please sign in to comment.