Skip to content

Commit

Permalink
feat: print unknown messages when debug is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
owen2345 committed Jan 16, 2023
1 parent 1fbc0b4 commit f52bfa8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pub_sub_model_sync/service_google.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ def subscribe_to_topics

def process_message(received_message)
message = received_message.message
super(message.data) if message.attributes[SERVICE_KEY]
if message.attributes[SERVICE_KEY]
super(message.data)
elsif config.debug
log("Unknown message (#{SERVICE_KEY}): #{[message, message.attributes]}")
end
received_message.acknowledge!
end
end
Expand Down

0 comments on commit f52bfa8

Please sign in to comment.