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!

Getting messages from all topic subscription even if subscribing to specific topic

Amol D
Amol D Member Posts: 7

Hi,

I have client code which creates the subscription on queue and its topic, now when i am trying to consume the message from specific topic subscription with below code, consumer is receiving the messages from other topic subscription too under the same queue

For example, when I am subscribing to "Demo/Msg" , I am expecting my listener should only get called when there are messages published/available on "Demo/Msg", but its also consuming the messages from topic "Demo", even if i didn't creating consumer to it.

queueName": "QUE_TEST"

 "subscription_topics": [

    "Demo/Msg",

    "Demo"

   ]

.net code below, Please advise, 


Comments

  • arih
    arih Member, Employee Posts: 125 Solace Employee

    hi @Amol D ,

    Looks like your code is consuming from the QUE_TEST and added the Demo/Msg topic subscription to that Queue when connecting.

    And I'm guessing that QUE_TEST is already created and already had "Demo" as another topic subscription.

    In that case, your app will actually receive any messages published with those two topics: Demo and Demo/Msg.

    I think this is similar to your other question, when your app is consuming from a Queue, you shouldn't need to worry about the topic (decoupling it) - but instead making use of the persistency. If you need specifically only Demo/Msg, then you either subscribe with Direct Messaging or create a new Queue with only Demo/Msg topic subscription.

    Hope that helps.

    -Ari

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 549 admin

This Month's Leaders

This Week's Leaders