I need to listen ethereum transactions for current count of addresses using web3j. I know that I can use subscribe to get transactions, but how can I add some filter to listen a certain number of accounts?

Subscription subscription = web3j.transactionFlowable().subscribe(tx -> {// some code});
  • Ivan my man the community is awaiting your return can you please answer me in the discord
    – ptc pat
    Aug 12, 2020 at 4:49
  • is this subscribe event is like a observer on Kotlin? that will notific me every status change on the Transaction? Nov 3, 2022 at 15:06

1 Answer 1


If you want to listen to transactions on an account you can do the following:

web3j.transactionFlowable().filter({tx -> tx.to == "0xaddress" })

However, you should note that under the hood it will be getting every transaction using the rpc endpoint.

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.