Class: Karafka::Web::Pro::Commanding::Matchers::SchemaVersion
- Defined in:
- lib/karafka/web/pro/commanding/matchers/schema_version.rb
Overview
Matcher that checks if the message schema version matches the current dispatcher schema version. This ensures compatibility between command producers and consumers. This is a required matcher that always applies.
Instance Method Summary collapse
-
#matches? ⇒ Boolean
True if schema version matches.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Karafka::Web::Pro::Commanding::Matchers::Base
Instance Method Details
#matches? ⇒ Boolean
Returns true if schema version matches.
44 45 46 |
# File 'lib/karafka/web/pro/commanding/matchers/schema_version.rb', line 44 def matches? .payload[:schema_version] == Dispatcher::SCHEMA_VERSION end |