openfaas / connector-sdk

SDK for connecting events to functions
MIT License
54 stars 25 forks source link

Support for wildcards in Function Topic #48

Closed chriskolenko closed 4 years ago

chriskolenko commented 4 years ago

My actions before raising this issue

I would like to provide a wildcard in my Function Topic Annotation.

Expected Behaviour

When creating a Function I would like to get all events with some sort of grouping. IE. Adding order.* in the topic annotation should match with a message that has a subject of order.Purchased

Current Behaviour

You have to be exact with your topic / subject. So the topicMap matches it.

Possible Solution

Add basic globing syntax in the topicMap.Match Function.

Context

This feature would be great when doing things such as Catch All + Message Observing as well as supporting my lazy programmer needs so I can listen to all messages from a particular Bounded Context.

Your Environment

Just tried with the latest "connector-sdk" library in my fork of nats-connector.

chriskolenko commented 4 years ago

Project maintainer doesn't understand what this means so closing.