[ https://issues.apache.org/jira/browse/PROTON-1952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy updated PROTON-1952: --------------------------- Description: In the amqp standard, [link-credit|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-flow-control] is defined as: "the current maximum legal amount that the delivery-count can be increased by". Only the receiver can set its value. In the current proton API, we can only add to the link-credit. We cannot set it (our need is to set it to a value less than the actual link-credit). As to why we need this, we are trying to implement an asynchronous get with timeout (by returning a std::future). I understand that in the amqp standard, there are 2 supported modes of delivery, and async get with timeout is not mentioned: * [Synchronous get (with/without timeout)|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-idp494704] * [Asynchronous notifications|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-idp502800] Therefore, we're implementing it for its convenience to us (the client receives the response/exception in his thread). Problem arises when we start having timeouts. Briefly (I can give you more details here if you want), having the ability to set the link-credit to a lower value would facilitate our lives. was: In the amqp standard, [link-credit|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-flow-control] is defined as: "the current maximum legal amount that the delivery-count can be increased by". Only the receiver can set its value. In the current proton API, we can only add to the link-credit. We cannot set it (our need is to set it to a value less than the actual link-credit). As to why we need this, we are trying to implement an asynchronous get with timeout (by returning a std::future). I understand that in the amqp standard, there are 2 supported modes of delivery, and async get with timeout is not mentioned: * [Synchronous get with timeout|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-idp494704] * [Asynchronous notifications|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-idp502800] Therefore, we're implementing it for its convenience to us (the client receives the response/exception in his thread). Problem arises when we start having timeouts. Briefly (I can give you more details here if you want), having the ability to set the link-credit to a lower value would facilitate our lives. > Add possibility to set link-credit in proton receiver API > --------------------------------------------------------- > > Key: PROTON-1952 > URL: https://issues.apache.org/jira/browse/PROTON-1952 > Project: Qpid Proton > Issue Type: Bug > Components: cpp-binding > Affects Versions: proton-c-0.22.0 > Reporter: Jeremy > Priority: Critical > Labels: reproducer > > In the amqp standard, > [link-credit|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-flow-control] > is defined as: "the current maximum legal amount that the delivery-count can > be increased by". Only the receiver can set its value. > In the current proton API, we can only add to the link-credit. We cannot set > it (our need is to set it to a value less than the actual link-credit). > As to why we need this, we are trying to implement an asynchronous get with > timeout (by returning a std::future). > I understand that in the amqp standard, there are 2 supported modes of > delivery, and async get with timeout is not mentioned: > * [Synchronous get (with/without > timeout)|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-idp494704] > > * [Asynchronous > notifications|http://docs.oasis-open.org/amqp/core/v1.0/cos01/amqp-core-transport-v1.0-cos01.html#doc-idp502800] > Therefore, we're implementing it for its convenience to us (the client > receives the response/exception in his thread). > Problem arises when we start having timeouts. Briefly (I can give you more > details here if you want), having the ability to set the link-credit to a > lower value would facilitate our lives. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org