question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Query] Service Bus - Does AmqpTransactionManager tx management need to be atomic?

See original GitHub issue

Query/Question

Currently AmqpTransactionManager acquires a lock around a simple dictionary. If the operations in the case a current enlistment is not present don’t have to be atomic the implementation could be switched to a concurrent dictionary which would boost performance in concurrent scenarios.

Thoughts @nemakam @jsquire

Happy to provide a PR.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nemakamcommented, Aug 5, 2019

@danielmarbach , I took a quick look on the code that was present in the screenshot. It doesn’t take care of the whole thing. If two operations are concurrently trying to call this, and one of them throws after adding and removing from dictionary, but the other operation does a successful dictionary.get (due to race condition), how do you make sure that that operation fails? The more I think of it, the more I feel there’s no easy way to get rid of the lock.

0reactions
nemakamcommented, Aug 5, 2019

Sorry this didn’t work out. Thanks for the effort! (y)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overview of transaction processing in Azure Service Bus
This article discusses the transaction capabilities of Microsoft Azure Service Bus. Much of the discussion is illustrated by the AMQP ...
Read more >
spring - XA transactions and message bus
Is this configuration really gives me an atomic transaction? · I've heard that the chained tx manager is not using a 2 phase...
Read more >
Pattern: Sagas
In such case rollback is called on atomic transaction 1 and atomic transaction 2, which are already committed as they are atomic -...
Read more >
Microsoft Azure Service Bus operation
The Microsoft Azure Service Bus operation defines how to process messages from a queue, topic, and subscription.
Read more >
Using Transactions in Quarkus
Quarkus comes with a Transaction Manager and uses it to coordinate and expose transactions to your applications. Each extension dealing with persistence ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found