Solace Community is getting a facelift!

On March 3rd we will be starting the process of migrating Solace Community to a new platform. As a result, Solace Community will go in to a temporary read-only state. You will still be able to come onto Solace Community and search through posts to find answers, but you won't be able to ask questions, post comments, or react in any way.

We hope to have the migration complete by Wednesday March 5th (or sooner), so please keep an eye out!

How can you find topics that have no subscriptions?

JamilAhmed
JamilAhmed Member, Employee Posts: 20 Solace Employee
edited February 2022 in PubSub+ Event Broker #1

A publisher can be producing events on a topic that have no interested consumers.

Is there a way to list those topics for the purposes of clean-up or decommission of unused flows?

This condition would also be causing the client counter Ingress Discard - No Subscription Match to increment.

Best Answer

  • JamilAhmed
    JamilAhmed Member, Employee Posts: 20 Solace Employee
    #2 Answer ✓

    The broker maintains an in-memory rolling log of these topics, at a maximum of 1000 entries.

    This log can be viewed within the CLI with the following command:

    > show log no-subscription-match

    > show log no-subscription-match message-vpn myVPN

    This same command can also be issued over SEMPv1 with the following request XML:

    <rpc>
      <show>
        <log>
          <no-subscription-match>
            <vpn-name>myVPN</vpn-name>
          </no-subscription-match>
        </log>
      </show>
    </rpc>
    

    A curl example would be like so:

    curl -d @get-no-subscription-match.xml -u user:pass https://broker-hostname:943/SEMP

    where the file get-no-subscription-match.xml contains the above request XML.

    The response contains an entry for the published topic each time it was published to, along with details of the client-name and client-username.

    <rpc-reply semp-version="soltr/9_10VMR">
     <rpc>
      <show>
       <log>
        <no-subscription-match>
         <entry>
          <client-name>solclientjs/chrome-98.0.4758-Windows-0.0.0/3560415772/0001</client-name>
          <client-username>solace-cloud-client</client-username>
          <vpn-name>myVPN</vpn-name>
          <topic>testing/no-sub/match</topic>
         </entry>
         <entry>
          <client-name>solclientjs/chrome-98.0.4758-Windows-0.0.0/3560415772/0001</client-name>
          <client-username>solace-cloud-client</client-username>
          <vpn-name>myVPN</vpn-name>
          <topic>testing/no-sub/match</topic>
         </entry>
        </no-subscription-match>
       </log>
      </show>
     </rpc>
    <execute-result code="ok"/>
    </rpc-reply>
    


Answers

  • JamilAhmed
    JamilAhmed Member, Employee Posts: 20 Solace Employee
    #3 Answer ✓

    The broker maintains an in-memory rolling log of these topics, at a maximum of 1000 entries.

    This log can be viewed within the CLI with the following command:

    > show log no-subscription-match

    > show log no-subscription-match message-vpn myVPN

    This same command can also be issued over SEMPv1 with the following request XML:

    <rpc>
      <show>
        <log>
          <no-subscription-match>
            <vpn-name>myVPN</vpn-name>
          </no-subscription-match>
        </log>
      </show>
    </rpc>
    

    A curl example would be like so:

    curl -d @get-no-subscription-match.xml -u user:pass https://broker-hostname:943/SEMP

    where the file get-no-subscription-match.xml contains the above request XML.

    The response contains an entry for the published topic each time it was published to, along with details of the client-name and client-username.

    <rpc-reply semp-version="soltr/9_10VMR">
     <rpc>
      <show>
       <log>
        <no-subscription-match>
         <entry>
          <client-name>solclientjs/chrome-98.0.4758-Windows-0.0.0/3560415772/0001</client-name>
          <client-username>solace-cloud-client</client-username>
          <vpn-name>myVPN</vpn-name>
          <topic>testing/no-sub/match</topic>
         </entry>
         <entry>
          <client-name>solclientjs/chrome-98.0.4758-Windows-0.0.0/3560415772/0001</client-name>
          <client-username>solace-cloud-client</client-username>
          <vpn-name>myVPN</vpn-name>
          <topic>testing/no-sub/match</topic>
         </entry>
        </no-subscription-match>
       </log>
      </show>
     </rpc>
    <execute-result code="ok"/>
    </rpc-reply>
    


This Month's Leaders

This Week's Leaders