module
Crabbit::Murmur3
Overview
RabbitMQ-compatible seeded MurmurHash3 x86 32-bit implementation.
SuperStreamProducer uses this hash for
SuperStreamRouting::Hash. It is exposed so custom routing code can remain
byte-compatible with the official RabbitMQ clients.
Extended Modules
Defined in:
crabbit/super_stream.crConstant Summary
-
DEFAULT_SEED =
104729_u32 -
Seed used by RabbitMQ Stream client hash routing.
Instance Method Summary
-
#hash32(value : String, seed : UInt32 = DEFAULT_SEED) : UInt32
Returns the 32-bit Murmur3 hash of the UTF-8 bytes in value.
Instance Method Detail
def hash32(value : String, seed : UInt32 = DEFAULT_SEED) : UInt32
#
Returns the 32-bit Murmur3 hash of the UTF-8 bytes in value.