No commit activity in last 3 years
No release in over 3 years
A matcher for the AMQP topic binding algorithm
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 12.3.3
>= 0
 Project Readme

AmqpTopicBinding

This simple gem implements the matching algorithm for AMQP topic exchange routing key bindings, allowing you to do the same matching that is performed at the exchange when the broker is deciding what to send to a queue.

Wildcards are supported.

Usage

Simply ask the matcher if a routing key matches a pattern:

> AmqpTopicBinding::Matcher.new('foo.bar.*').matches?('foo.bar.baz')
=> true
> AmqpTopicBinding::Matcher.new('foo.bar.*').matches?('foo.bar')
=> false
> AmqpTopicBinding::Matcher.new('foo.#').matches?('foo.bar.baz')
=> true