Commit Graph

31 Commits

Author SHA1 Message Date
ItalyPaleAle b395ecd725 Small concurrency fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-14 21:07:35 +00:00
Alessandro (Ale) Segala b9f33ca14c
[release-1.10] Improve lock handling and renewal for ASB messages (fix #2532) (#2533)
* Improved lock renewal

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Better memory management

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Complete and abandon messages in parallel too

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 10->20

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

---------

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-14 11:33:13 -08:00
Alessandro (Ale) Segala 12acf8effe
[release-1.10] Azure Service Bus: fix goroutine "explosion" after recovering from failure and many other bugs (#2523)
* Fixed context leak

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Finalize messages in background

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* More tweaks

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Moved a lot more code to the shared implementation package

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Fixed:
- Fixed: if number of messages received in bulk is greater than maxConcurrentHandlers, a deadlock happens
- Fixed: maxRetriableErrorsPerSec was not working

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Some refactorings

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Simplifications

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Avoid checking if topic/queue exists every time we send a message

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Ensuring locks are renewed for all 3 components

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated ASB SDK

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Improvements to closing

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Improvements to closing

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Changed context propagation

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Debug logs in cert tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Initial delay before renewing locks

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* That last change was actually unnecessary

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Tweaks

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* More tweaks

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

---------

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-13 09:23:03 -08:00
Joni Collinge 7e141e75e0
revert to using map and mutex
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2023-01-18 19:23:52 +00:00
Joni Collinge 58daacbdcd
use sync.Map instead of map and mutex for active message tracking
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2023-01-18 10:20:32 +00:00
Joni Collinge 77504a8289
assign to slice rather than append
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2023-01-15 10:12:28 +00:00
Joni Collinge c1de465e64
revert active message snapshot to use append
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2023-01-14 13:38:14 +00:00
Joni Collinge f6d31aba8d
Measure length after taking lock
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2023-01-13 18:36:39 +00:00
Joni Collinge 1c342e32d0
lint
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2023-01-05 14:25:40 +00:00
Joni Collinge e097a04842
Feedback
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2023-01-05 14:15:00 +00:00
Joni Collinge 4b99832634
Use if not select for context check
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-20 18:11:20 +00:00
Joni Collinge 5051e28b9c
Address feedback
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-20 09:59:20 +00:00
Joni Collinge b6911b67fd
Use struct for NewSubscription to simplify parameters
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-20 09:23:30 +00:00
Joni Collinge 0db24fa04e
Update certification test
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-12 21:43:18 +00:00
Joni Collinge a4a2466d2b
remove dead code
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-09 15:14:34 +00:00
Joni Collinge ec1dfbe8fe
If require sessions and no session id, set blank
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-09 10:08:51 +00:00
Joni Collinge bfbc382422
lint
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-07 15:41:01 +00:00
Joni Collinge dde82c6c41
remove dead code
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-07 15:33:47 +00:00
Joni Collinge 75025d5fba
Add metadata
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-07 15:23:18 +00:00
Joni Collinge 303182341a
WIP: Support ASB sessions
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-06 16:35:51 +00:00
Joni Collinge c27a6580a8
WIP: ASB sessions
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-12-02 15:40:48 +00:00
ItalyPaleAle 8bce0d5200 Moved metadata to impl package
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-19 19:47:26 +00:00
ItalyPaleAle f1c4555078 Fixed merge conflict
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-11 23:33:54 +00:00
ItalyPaleAle 3bc20a1de5 Merge branch 'master' into merge-1.9
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-11 20:26:35 +00:00
Alessandro (Ale) Segala ef74e7f8b6
Azure Service Bus: consider receiving 0 messages as an error that requires reconnecting (#2169)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-10-11 12:57:06 -07:00
Deepanshu Agarwal f74b4d648d Update EntryID to EntryId
Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
2022-09-29 15:49:45 +05:30
Shubham Sharma 4f406a597f
Add bulk subscribe support to Azure Service Bus (#2100)
* Initial implementation

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* 

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add comment

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Refactor messages.go and add tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update message tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Refactor servicebus.go logic

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Refactor handleAsync

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Refactor ReceiveAndBlock

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update binding

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Review comments addressed

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Lint

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update metadata name

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update activeMessagesChan logic for concurrency control

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update metadata name

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Use request metadata instead of component metadata

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Review comments addressed

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix merge issue with metadata

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Remove unused metadata key

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix merge issue with metadata

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Lint!!!

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2022-09-23 10:49:06 -07:00
Bernd Verst e87cd5e4cb
Go 1.19 support and linter fixes (#1975)
* Go 1.19 support and linter fixes

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update workflows for Go1.19 and new linter version

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Remove unnecessary space in nolint directive

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* disable additional linters which aren't used because of Go generics

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* enable gosec linter again

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update bindings/zeebe/command/publish_message_test.go

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update bindings/output_binding.go

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Use prepared statement for mysql table creation

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Ping is not ping

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* c'mon linter

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Fix MySQL gosec issue

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* revert mysql to be fixed later

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-18 00:45:23 -07:00
Alessandro (Ale) Segala f2ac0cda69
Ensure locks in channels are properly released (#1957)
Fixes #1865

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-08-10 14:52:46 -07:00
Joni Collinge 5afb1c9b8f
Use unique message key in Azure ServiceBus PubSub (#1898) 2022-07-21 10:13:58 -07:00
Alessandro (Ale) Segala a08988c25e
Shared implementation for Azure Service Bus subscriptions for binding and pubsub (#1791)
* Moved ASB subscription code to a shared package

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Moved ASBQ binding to use the shared ASB implementation

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updating Azure Service Bus SDK version

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-06-17 15:12:15 -07:00