Levels for naming topic/queue names

Aravindh Ravi
Aravindh Ravi Member Posts: 4
edited July 2021 in PubSub+ Event Broker #1

Is it always required to provide pattern of all 4 levels when we create a solace topic?



  • ChristianHoltfurth
    ChristianHoltfurth Member, Employee Posts: 68 Solace Employee
    edited July 2021 #2

    Hi @Aravindh Ravi ,

    Can you explain what you mean by 4 required levels and provide more context to your question?

    Without further background on your question, I'd answer simply that you don't need to provide 4 levels.

    You can publish to pretty much any string value representing a topic in Solace.
    For example, I could publish to topics like

    • 1
    • topic1
    • a
    • a/b
    • a/b/c
    • myfirstlevel/mysecondlevel/mythirdlevel/myfourthlevel/myfifthlevel/mysixthlevel
    • andsoonandsoforth

    Similarly for queues, there's no level requirement. You could simply name your queues:

    • queue1
    • queue2
    • my.queue
  • amackenzie
    amackenzie Member, Employee Posts: 260 Solace Employee

    Solace topics are very flexible and there are very few requirements.
    It is not required to have multiple levels at all.
    For example a is a valid topic name in PubSub+.
    Levels and wildcards can be added to provide structure and flexibility to your application but such structure is not required. It's more of a "best practice" for application design.

  • TomF
    TomF Member, Employee Posts: 408 Solace Employee

    @Arvind Mishra , further to what @ChristianHoltfurth said, topics in Solace are fully dynamic - that means a topic can have from 1 to 128 levels.

    However, you may have a topic taxonomy. That specifies what levels your topic should conform to. It may be that you have a topic taxonomy that specifies 4 levels. This would be unusual, I think - it's rather a small number of levels.

    You can find out more about topic taxonomies in this blog.

  • Aravindh Ravi
    Aravindh Ravi Member Posts: 4

    Thanks all for the clarification

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 541 admin

    @Aravindh Ravi ... where did you hear that Solace topics require 4 levels? Or how did you come to understand that? Thanks!