In my Java-web-application I have (with one click) to send about 120 transactions after each other from the same address to the same smartcontract.

My question: is there any java libraries or implemented "retry mechanism" for handling very long pending transactions, or a way to save transactions in a persistent Queue (cause i can't just save them in memory) before sending them to the Blockchain.

  • Could you please clarify if with "Java-web-application" you mean "Javascript in the web page (client side)", or "Java code on the server", or even web3j.io android app? Commented Nov 6, 2018 at 12:02
  • hallo Mr. @MarcoOttolini , java code on the server side(backend).
    – Majd TL
    Commented Nov 6, 2018 at 13:43

1 Answer 1


Assuming you want to broadcast 120 transactions, but the transaction no 50 gets stuck because it has a low gas price.

You can reconstruct the tx number 50, set a higher gas price and broadcast the new tx.

As long as the sending address and the nonce for tx no 50 are the same, everything else can be different: the amount sent, the type of transaction, etc.

  • Thank you for the reply, I'm looking exactly for a library or some implemented and already tested methods which manage this problem in the background
    – Majd TL
    Commented Nov 6, 2018 at 16:06
  • You mentioned web3j. That is a rock solid library for dealing with ethereum transactions. Rather than trying to figure out if there's any tool to match your current app flow and config to do this, I think it would be much easier (or actually doable) for you to build such a mini class yourself. Commented Nov 6, 2018 at 16:10
  • right writing it is not the problem, but testing it was really painfull.
    – Majd TL
    Commented Nov 8, 2018 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.