Skip to content

Fix testCurrentOperationByteCount test race condition#198

Merged
jcookems merged 1 commit into
Azure:devfrom
joeg:dev
Jan 14, 2013
Merged

Fix testCurrentOperationByteCount test race condition#198
jcookems merged 1 commit into
Azure:devfrom
joeg:dev

Conversation

@joeg

@joeg joeg commented Jan 14, 2013

Copy link
Copy Markdown

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