Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
Joel Hendrix 4974e2fd69
Update to latest go-amqp (#254)
Includes updates due to API breaking changes.
Cleaned up various linter bugs.
Removed some dead code.
2021-10-01 15:21:54 -07:00
Richard Park e882857a71
Use link caching for $management operations (renew locks) (#248)
Make it so we use a single management link (most of the time) when doing dispositions or lock renewal (or other management related operations).

Also, added in a simple stress test. It's a bit manual at the moment, but it initiates 1000 concurrent renew lock calls at once, so it's a decent test of our response routing.
2021-09-02 13:56:35 -07:00
Stéphane Erbrech d6775646da
defer close the link! (#244)
* defer close the link!

* nicer wrapping

* fold error handling to avoid variable shadowing and make scopes clearer

* fix return

* revert to simplest change possible
2021-08-12 17:26:26 -07:00
Robert Zakrzewski 319bf88d37
Add associate-link-name property to RenewLocks function. (#225)
* Add associated-link-name property to RenewLocks message. Fix connection idle timeout for messages with >=10minsprocessing time.

* Upgrade go-amqp

* Make message.getLinkName package level function

* only set associated link name if available

Co-authored-by: Robert Zakrzewski <Robert.Zakrzewski@tomtom.com>
Co-authored-by: Joel Hendrix <jhendrix@microsoft.com>
2021-05-06 14:33:15 -07:00
Joel Hendrix 296ac2ca91
Add recovery mechanism to rpcClient (#206)
* Add recovery mechanism to rpcClient

RPC operations will now attempt to recover, similar to sender and
receiver, in case of failure.
Fixed Recover() to atomically rebuild the client.
Close() will now close auth auto-refresh.

* add transient error checks

* don't recover on a closed connection

use common.Retry() for Recover() retry loop
added recovery tracing and debug logging

* improve some doc comments

* avoid potential for infinite loop
2021-02-17 07:53:04 -08:00
Joel Hendrix f9ea40a809
Consolidate auth auto-refresh (#205)
* Consolidate auth auto-refresh

Moved the enabling of auth auto-refresh to when calling
negotiateClaim().  This ensures that all code paths that require
authentication will enable auto-refresh.
Ensure that there's only one goroutine that performs the refresh.
Changed auth refresh interval to 15 minutes per guideance from SB.
Exit auth auto-refresh goroutine if it fails; this should help trigger
recovering of clients due to failed authentication.

* cancel auth when closing RPC client

* reuse existing timer

* reset the the auto-refresh guard on exit

The Recover() case will rebuild the AMQP client which means a new
refresh goroutine should be started.
Use a channel to synchronize with the refresh goroutine exiting.

* improved refresh goroutine synchronization

* don't exit refresh goroutine on refresh failure

* rename vars

* simplify timer
2021-02-09 16:13:35 -08:00
Chris ff0e3f064d
Fix for Websocket behind Proxy Issue (#196)
* Fix lastError race

* Move websocket pkg out of std lib to deal with proxy.

* Add WebsocketEOF to connection closed error check.

* add comment

* added ctx to flow to ns.newClient

Co-authored-by: Alexander Pashkov <alexpashkov123@gmail.com>
Co-authored-by: Chris <christopher.mcmillon@halliburton.com>
Co-authored-by: Joel Hendrix <jhendrix@microsoft.com>
2020-12-02 07:58:44 -08:00
Jeff Principe dfc63648e7
Support send and receiving custom annotations in System Properties (#169)
* Support send and receiving custom annotations in System Properties

* update changelog and version number

Co-authored-by: Joel Hendrix <jhendrix@microsoft.com>
2020-06-03 12:15:05 -07:00
Joel Hendrix e738348ca5
Update amqp and other dependencies (#153)
* update dependencies

switched pack.ag/amqp to github.com/Azure/go-amqp
updated azure-amqp-common-go to v3
update Go SDK dependencies to latest versions

* fix test output, ignore .vscode directory

* update release notes and version info
2019-12-16 09:58:02 -08:00
David Justice 0e6104194c
add some client locking around renegotiation 2019-07-16 11:52:44 -07:00
David Justice 4f62591691
peek lock is backwards for defer 2019-07-15 10:43:11 -07:00
David Justice d2cb833e7d
add receive deferred messages with receive mode 2019-07-12 15:19:26 -07:00
David Justice 302e33f089
refactor rpc and entities 2019-07-12 14:16:25 -07:00