Class: Synapse::Partitioning::AMQP::ModuleRoutingKeyResolver
- Inherits:
-
Object
- Object
- Synapse::Partitioning::AMQP::ModuleRoutingKeyResolver
- Defined in:
- lib/synapse/partitioning/amqp/key_resolver.rb
Overview
Implementation of a routing key resolver that uses the message payload’s module name
Instance Method Summary collapse
Instance Method Details
#resolve_key(message) ⇒ String
17 18 19 20 21 22 |
# File 'lib/synapse/partitioning/amqp/key_resolver.rb', line 17 def resolve_key() type = .payload_type.to_s type.deconstantize.underscore.tap do |key| key.tr! '/', '.' end end |