casnerano/amqp-topic-match

A utility for matching routing keys to AMQP-style topic patterns.

Maintainers

Package info

github.com/casnerano/amqp-topic-match

pkg:composer/casnerano/amqp-topic-match

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

dev-master 2021-11-01 16:54 UTC

This package is auto-updated.

Last update: 2026-03-29 01:05:16 UTC


README

A utility for matching routing keys to AMQP-style topic patterns.

Usage

use \Casnerano\AMQPTopicMatch\AMQPTopicMatch;

$amqp_topic_match = new AMQPTopicMatch();

$amqp_topic_match->match("a.b.c.d", "*.b.#");    # return true
$amqp_topic_match->match("c", "#.c.#");          # return true
$amqp_topic_match->match("a.b.c.d", "*.b.c");    # return false