Is it possible to adjust the transport window size using v1.4 solace-pubsubplus Python client?

balast
balast Member Posts: 8
edited November 2022 in General Discussions #1

https://docs.solace.com/Messaging/Guaranteed-Msg/Configuring-Queues.htm says "Modifying max-delivered-unacked-msgs-per-flow may negatively impact performance if it's set lower than the transport window size used by consuming clients."

Is possible to set the transport window size for a subscriber using the latest version (v1.4) of solace-pubsubplus python package? Thanks

Answers

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee

    Hi @balast,

    Before I even answer that, I have to ask: why? What are you trying to do?

    max-delivered-unacked-msgs-per-flow is by default high (10,000) and the transport window is no where near as high (max 255), so it's a pretty rare condition to have the window bigger.

  • balast
    balast Member Posts: 8

    Hi Tom, thanks for your quick response. My previous question explains my situation https://solace.community/discussion/comment/5414. I want to set transport window to 1 so that the subscribers only grab a single message from the queue at a time. I plan to leave max-delivered-unacked-msgs-per-flow at the default value.

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee

    In this case you'll be setting both to 1. Leaving max-delivered-unacked-msgs-per-flow will not give you want you want, because the broker will deliver one message to the API, wait for the API to respond it got the message (which it will), then send another. You need to tell the broker to wait for an ack from the application (i.e. you called ack()) as well. That's what setting max-delivered-unacked-msgs-per-flowis for

    Performance of the broker to consumer connection will indeed take a huge hit - but your need to process tasks one by one is greater than how fast you can get tasks to consumers. So, set both to 1 and don't worry about performance.

  • balast
    balast Member Posts: 8

    Thanks Tom for the additional info and explanation. I still have the question how can I set transport window size using v1.4 of solace-pubsubplus, the python client. I'm not sure whether it's possible or not after looking at the documentation.

  • balast
    balast Member Posts: 8
    edited December 2022 #6

    Bumping since the original question still remains. Anyone know the answer to this?

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 491 admin
    edited December 2022 #7

    Hey @balast - as of right now you can only set the max-delivered-unacked-msg-per-flow to 1 using the management API SEMP. The python API doesnt support setting that property.

    Our recommendation is to set this property on the queue and each consumer connected to the queue gets the same value.

  • AlexanderJHallAgain
    AlexanderJHallAgain Member Posts: 2

    Hey @Tamimi - what about the window size? Can we adjust the window size in Python?

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

    Hey @AlexanderJHallAgain - you cant set the window size from the Python API either. If you set max-delivered-unacked-msg-per-flow to 1, you don't have to set the transport window, it will be effectively 1 as well.