Skip to content

A way for a message to be filtered #23

@mattisking

Description

@mattisking

This is great and I handle the filtering in the subscriber currently, but it would be cool if I had a way to Subscribe to an object, but only if that object has a certain key value. In RabbitMQ I can accomplish it with different channels. Basically I have an object being emitted from a background processor reading from an open socket, completing messages, serializing them as needed, filtering out things that aren't necessary, etc and then eventing/emitting the message out. The message itself is a consistent json payload and I've been experimenting with having that process Publish the Message and then my Consumer objects Subscribe and then each can process that payload however. The only issue is that each of my consumers cares about only payloads that meet certain criteria (generally a single identifier field in the json payload). Currently I just send down all the messages to all the consumers and they filter them as needed, but it would be cool if I could somehow specify in the consumer which payload I want when subscribing. I can't use RabbitMQ or Redis PubSub in this application and was looking for a simple in-memory pubsub mechanism and this has been great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions