🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

Is the ! (exception) subscription filter ?

Robert
Robert Member Posts: 58 ✭✭

When i look up this documentation nothing is mentioned about excluding specific topics from subscription by using "!":
https://docs.solace.com/Basics/Wildcard-Charaters-Topic-Subs.htm
(i would have expected a hint that this exists under certain conditions)

When i look here it mentions the possibility to exclude a topic by using ! in front:
https://docs.solace.com/Configuring-and-Managing/System-Level-Subscription-Exception-Config.htm

So from what i read is likely not mentioned as it does not work in all cases.
Is that assumption correct ? Additional you have to enable to use that capability.

As well i assume you can only exclude or include the entire topic:
order/AP/*/CUST => all customer orders in region asia pasific
!order/AP/CN/CUST => exclude chinese orders from region AP

Problem with that is that as not everywhere supported in case of not being able to use the only alternative would be to list any country in region asia pacific except of CN.
That will add administrative complexity.

Answers

  • ChristianHoltfurth
    ChristianHoltfurth Member, Employee Posts: 75 Solace Employee

    Hi @Robert,

    Thanks for highlighting this topic. Maybe there's a case here to be made for topic subscription exceptions to be explained and highlighted more across our documentation.
    They are indeed supported for the cases mentioned (guaranteed messaging use cases).
    But not supported for direct messaging use cases as detailed in the docs under the second link you provided.

    I didn't get what you meant by this comment:

    So from what i read is likely not mentioned as it does not work in all cases.
    Is that assumption correct ? Additional you have to enable to use that capability.

    Subscription exceptions are enabled by default according to the docs. Did you experience something different?

    As well i assume you can only exclude or include the entire topic:
    order/AP/*/CUST => all customer orders in region asia pasific
    !order/AP/CN/CUST => exclude chinese orders from region AP

    Problem with that is that as not everywhere supported in case of not being able to use the only alternative would be to list any country in region asia pacific except of CN.
    That will add administrative complexity.

    Your example is correct, without subscription exceptions you would have to fine tune your subscriptions a lot more in the above example. With subscription exceptions, you can more easily exclude a single value, like CN in this example. That is what they are used for.
    You can also use wildcards in your subscriptions exceptions, if you need to exclude a wider range of topics.

  • Robert
    Robert Member Posts: 58 ✭✭

    @ChristianHoltfurth thanks christian for your reply. What i was surprised that here this ! was not mentioned.
    https://docs.solace.com/Basics/Wildcard-Charaters-Topic-Subs.htm
    No example for using !

    So my assumption was that likely because for the usage some restrictions exists.
    Still i think it would be good that exceptions are possible.

  • ChristianHoltfurth
    ChristianHoltfurth Member, Employee Posts: 75 Solace Employee

    Thanks @Robert, I'll raise this with our docs team to see, if we can pepper a few more mentions across our doc pages.