try {
Future<Long> f = invoke(operation);
Long itemId = f.get();
if (itemId != null) {
if (!itemIdSet.add(itemId)) {
throw new TransactionException("Duplicate itemId: " + itemId);
}
offeredQueue.offer(new QueueItem(null, itemId, data));
TxnOfferOperation txnOfferOperation = new TxnOfferOperation(name, itemId, data);
QueueTransactionLog transactionLog = new QueueTransactionLog(
tx.getTxnId(), itemId, name, partitionId, txnOfferOperation);