event filtering beyond Java Type based filter
See original GitHub issueHi, all, Can event bus dispatch events beyond Java Type based filter? For example, I have the following scenario. QuoteEventListener only want to listen events filtering by ticker instead of just java type QuoteEvent.class.
// stock quote event
public class QuoteEvent {
private final String ticker;
private final double price;
public QuoteEvent(String ticker_, double price_) {
ticker = ticker_;
price = price_;
}
public String getTicker() {
return ticker;
}
public double getPrice() {
return price;
}
}
QuoteEventListener listener1 = new QuoteEventListener("MSFT");
QuoteEventListener listener2 = new QuoteEventListener("GOOG");
EventBus eventBus = new EventBus("feeder");
eventBus.post(new QuoteEvent("MSFT", 12.34)); // only listener1 will be notified
eventBus.post(new QuoteEvent("GOOG", 12.34)); // only listener2 will be notified
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
AWS Lambda now supports event filtering for Amazon SQS ...
AWS Lambda now provides content filtering options for SQS, DynamoDB and Kinesis as event sources. With event pattern content filtering, ...
Read more >How to filter events in Jersey SSE? - java - Stack Overflow
It is very simple app that has one input and one button. You type some text, click the button and other people get...
Read more >Event Filters - ITOM Practitioner Portal - Micro Focus
You can limit the set of events displayed in the Event Browser using filters that you define to display a subset of the...
Read more >3 Working with Event Filters (Release 8)
Event filters enable you to handle an event during the event capturing phase of event processing. A node can have one or more...
Read more >How to use map, filter, and collect methods in Java Stream ...
The filter method essentially selects elements based upon a condition you provide. That's the reason that the filter ( Predicate condition) accepts a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there a reason you couldn’t do this filtering in the listener itself?
Realistically, we’re unlikely to add functionality to EventBus at this point.