Differences in Durable and Non durable subscriptions of a topic endpoint

rdesoju
rdesoju Member Posts: 66

Hi,
I observed a difference in message delivery pattern with the below setup:
1. a topic endpoint (Non-Exclusive)
2. Two Non Durable Subscribers
3. Two Durable Subscribers
(note: each subscriber was given a unique name so that there is no connection conflict)

When Producer published messages, Two non-durable subscribers received all copies of messages. However, messages are delivered alternatively to durable subscribers and hence each durable subscriber received half of the messages. Client program had an id (custom sequence number generated inside producer) in each message. So, DurableSubscriber1 received 1,3,5,7,9....and DurableSubscriber2 received 2,4,6,8 and so on.

Two questions:
1. Is this an expected behavior?
2. Is there any configuration setting using which we can make all DurableSubscribers receive all messages?
Please suggest.

Thanks,
Raghu

Best Answers

  • rdesoju
    rdesoju Member Posts: 66
    #3 Answer ✓

    Hi @marc ,
    Thank you very much for the great explanation :) !
    I have below questions after going through the information:
    1. Fan out with multiple durable subscriptions does not work without having the 'Queues' (in the middle) subscribe to the topic. Correct?
    2. Both durable and non-durable subscriptions does not show the same behavior. In case of non-durable subscriptions, all subscribers are able to receive all messages. However, in case of durable subscription, subscribers are receiving only sub set of messages in a round robin fashion as mentioned. May I know what is the reasoning behind treating these two subscription models differently?

    Thanks,
    Raghu

Answers

  • amackenzie
    amackenzie Member, Employee Posts: 268 Solace Employee
    edited March 2020 #5

    Hi,
    1. This is intended behavior
    2. Create a queue for each consumer and have them all attract the same topic - all queues will have the same messages because they are attracting messages using the same subscriptions (assuming that's how they are configured). Each consumer would bind to their own queue to get their messages. This also means that, since each consumer acknowledges its own messages, that the various consumers don't all have to be online and processing messages at the same pace like they do when using non-persistent/direct messaging.

    It's unclear which API you are using for your use case. There is some JMS terminology there but also some Solace-specific terms. Can you elaborate on this?

    There are some good sections of our docs that talk about these topics like:

  • rdesoju
    rdesoju Member Posts: 66
    edited March 2020 #6

    some issue with the page.

  • rdesoju
    rdesoju Member Posts: 66
    #8 Answer ✓

    Hi @marc ,
    Thank you very much for the great explanation :) !
    I have below questions after going through the information:
    1. Fan out with multiple durable subscriptions does not work without having the 'Queues' (in the middle) subscribe to the topic. Correct?
    2. Both durable and non-durable subscriptions does not show the same behavior. In case of non-durable subscriptions, all subscribers are able to receive all messages. However, in case of durable subscription, subscribers are receiving only sub set of messages in a round robin fashion as mentioned. May I know what is the reasoning behind treating these two subscription models differently?

    Thanks,
    Raghu

  • rdesoju
    rdesoju Member Posts: 66

    Thank you again for detailed insight into the behavior !!

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 959 admin

    No problem :smiley:
    Happy eventing!