Replies: 1 comment
-
Proposal - Simple Map based attribute filteringAdd attributes to nitric publish requests that allows additional metadata to be attached to event: import { topic } from "@nitric/sdk";
const notify = topic('notify');
const notifier = notify.for('publishing');
async function publishEmailNotification(message: string) {
await notifier.publish(
{ message },
// Publish with attributes
{ type: "email" }
);
}
notify.subscribe(async () => {
// handle email notification
}, {
// subscribe to message with a key 'type' and value 'email'
type: "email"
});
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Add the ability for topic subscriptions to be filtered by some attributes or data related to messages published to that topic, so subscribers can opt in to a subset of messages being published to a topic.
Current Workarounds:
At the moment multiple topics can be created for specialised subscribers.
Challenges
Supporting all existing implementations of the nitric eventing service:
Any and all proposals/suggestions/ideas welcome.
Beta Was this translation helpful? Give feedback.
All reactions