Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

Add support for 'condition' matching on @Subscriber similar to Spring's @EventListener #23

@longwa

Description

@longwa

Spring's @EventListener has a condition attribute that can use an SpEL expression to match:

@EventListener(condition = "#creationEvent.awesome")
public void handleOrderCreatedEvent(CreationEvent<Order> creationEvent) {
}

It would be super handy if @Subscriber could add the same support. This would allow for a better replacement to the pattern matching support that @Selector used to provide with the legacy reactor bus.

Also, we have an enumeration for our eventTypes to make it easier to find and maintain. Having the SpEL expression would allow us to match based on the actual enum value instead of needing to duplicate the string for the eventId (since you can't say value = MyEnum.name() in an annotation).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions