Class: Karafka::Web::Pro::Ui::Lib::Search::Matchers::RawPayloadIncludes
- Inherits:
-
Base
- Object
- Base
- Karafka::Web::Pro::Ui::Lib::Search::Matchers::RawPayloadIncludes
- Defined in:
- lib/karafka/web/pro/ui/lib/search/matchers/raw_payload_includes.rb
Overview
Note:
It is case sensitive
Note:
Ignores encoding issues
Checks for phrase existence in the raw payload
Instance Method Summary collapse
-
#call(message, phrase) ⇒ Boolean
Does message raw payload contain the phrase.
Methods inherited from Base
Instance Method Details
#call(message, phrase) ⇒ Boolean
Returns does message raw payload contain the phrase.
29 30 31 32 33 34 35 36 37 |
# File 'lib/karafka/web/pro/ui/lib/search/matchers/raw_payload_includes.rb', line 29 def call(, phrase) # raw payload can be nil for tombstone events return false unless .raw_payload .raw_payload.include?(phrase) # String matching on compressed data may fail rescue Encoding::CompatibilityError false end |