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.cr

Constant Summary

DEFAULT_SEED = 104729_u32

Seed used by RabbitMQ Stream client hash routing.

Instance Method Summary

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.


[View source]