Skip to content

Commit

Permalink
handle headers with string keys
Browse files Browse the repository at this point in the history
  • Loading branch information
nasark committed Nov 28, 2023
1 parent e4560c3 commit c0f2464
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 c0f2464

Please sign in to comment.