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!

Is it applicable to turn on/off Respect TTL settings in queue via API (using C#)

alhung
alhung Member Posts: 14

Hi everyone,

as title, I would like to turn on/off the Respect TTL setting using C# due to I have multiple queues with the same topic for different systems, and not all of the queue has consumers.

For those queue without consumers, I hope I can turn on the Message Expiry/Respect TTL freely until there is consumer to digest the queued messages. Based on the design, I don't need to worry the queue size full issue.

Now I could create the queue using C#, like the following code: and defined the properties, but after that, I could not turn it off by CreateQueue function, may I know if there is function to change the properties or other method to turn on/off Respect TTL via API?

Please let me know, thank you very much.

EndpointProperties endpointProps = new EndpointProperties()
                {
                    Permission = EndpointProperties.EndpointPermission.Consume,
                    AccessType = EndpointProperties.EndpointAccessType.NonExclusive,
                    RespectsMsgTTL = true
                };
IQueue queue = ContextFactory.Instance.CreateQueue(queueName))


Tagged:

Best Answer

  • amackenzie
    amackenzie Member, Employee Posts: 270 Solace Employee
    #2 Answer ✓

    The APIs for creating queues across the various languages are not intended to be full management APIs.

    Is it important for you to do this in your application? Respect TTL seems like something you would not change often.

    A recommendation would be to use the PubSub+ Manager web interface to do this or, of you need to do this programmatically, via the SEMPv2 management REST API. They both require message VPN-level admin credentials to do so, not the same user you are using in your application.

Answers

  • amackenzie
    amackenzie Member, Employee Posts: 270 Solace Employee
    #3 Answer ✓

    The APIs for creating queues across the various languages are not intended to be full management APIs.

    Is it important for you to do this in your application? Respect TTL seems like something you would not change often.

    A recommendation would be to use the PubSub+ Manager web interface to do this or, of you need to do this programmatically, via the SEMPv2 management REST API. They both require message VPN-level admin credentials to do so, not the same user you are using in your application.

  • alhung
    alhung Member Posts: 14

    Hi @amackenzie

    Thanks for your suggestion, using SEMPv2 REST API is a good option 🤩🤩

This Month's Leaders

This Week's Leaders