Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix testCurrentOperationByteCount test race condition #198

Merged
merged 1 commit into from
Jan 14, 2013
Merged

Conversation

joeg
Copy link

@joeg joeg commented Jan 14, 2013

No description provided.

jcookems added a commit that referenced this pull request Jan 14, 2013
Fix testCurrentOperationByteCount test race condition
@jcookems jcookems merged commit 5507198 into Azure:dev Jan 14, 2013
sima-zhu pushed a commit to sima-zhu/azure-sdk-for-java that referenced this pull request Mar 21, 2019
mssfang pushed a commit to mssfang/azure-sdk-for-java that referenced this pull request Apr 23, 2019
Introduces transaction support.

Operations can now be executed within a transaction context for atomicity.
Supported operations for transactions:
Send, Complete, Defer, DeadLetter, Abandon

Transaction cannot work across connections. Hence, to be able to Send and Receive in a single transaction, the sender and receiver has to be created using the same `MessagingFactory` instance (which represents a service bus connection). 

Sample usage:
```java
MessagingFactory factory = MessagingFactory.createFromConnectionStringAsync(connectionString);
IMessageReceiver receiver = ClientFactory.createMessageReceiverFromEntityPath(factory, entityPath, ReceiveMode.PEEKLOCK);

this.sender.send(message);
IMessage receivedMessage = receiver.receive();

// Begin a new transaction
TransactionContext transaction = factory.startTransaction();

// Complete a message within a transaction context
receiver.complete(receivedMessage.getLockToken(), transaction);

// Commit the transaction.
transaction.commit();
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants