You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2019/05/03 15:28:16 UTC

[GitHub] [qpid-proton] alanconway commented on issue #181: PROTON-2040 [cpp] Allow connection options to be updated for reconnect

alanconway commented on issue #181: PROTON-2040 [cpp] Allow connection options to be updated for reconnect
URL: https://github.com/apache/qpid-proton/pull/181#issuecomment-489135478
 
 
   On Fri, May 3, 2019 at 11:20 AM Andrew Stitcher <no...@github.com>
   wrote:
   
   > I don't think I like this design much.
   >
   > If I understand it correctly when you get to the reconnect you can't
   > modify the connection options but only overwrite them completely.
   >
   Nope the new options are applied over the existing ones in the manner of
   connection_options::update(), there's no explicit call to update but the
   application of the options is additive.
   
   
   > This means that you have to keep around the original connection options
   > and then update them with any changes. This is IMO inconvenient, but worse
   > isn't what the API seems to offer with the name reconnect_update() - even
   > if the comment is correct.
   >
   > I think it would it be better for the connection to keep around the
   > connection options used and then you could really update them. If we
   > implement it this way we could offer a more general
   > connection::connection_options() accessor and allow that to be updated
   > with the existing connection_options::update() API and not need the
   > reconnect_update() API which is strangely specifically named for
   > something that actually just overwrites the connection options and is not
   > really related to reconnect (except by intention).
   >
   That is effectively what happens - I'm not using update() explicitly but
   apply_unbound() effectively does the same thing - I believe, if I'm wrong
   then your approach would be better.
   
   > In any event, I think that in order to sensibly offer this functionality
   > someone has to remember the connection options so it might as well be the
   > binding.
   >
   It's the pn_connection_t objects that effectively "remember" the options,
   along with some of the internal C++ context objects. Probably I should add
   a test to prove this.
   
   
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/qpid-proton/pull/181#issuecomment-489131518>,
   > or mute the thread
   > <https://github.com/notifications/unsubscribe-auth/AB3LUXXKE3JZAA6S2BPOJP3PTRJONANCNFSM4HKFHJMA>
   > .
   >
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org