davsclaus opened a new pull request, #29113:
URL: https://github.com/apache/camel/pull/29113

   Fixes [CAMEL-26516](https://issues.apache.org/jira/browse/CAMEL-26516).
   
   Docs only. No code change in Camel (option 1 of the analysis on the JIRA).
   
   **What happens:** the consumer operations that use a web3j filter 
(`ETH_LOG_OBSERVABLE`, `ETH_BLOCK_HASH_OBSERVABLE`, 
`ETH_PENDING_TRANSACTION_HASH_OBSERVABLE`, `BLOCK_OBSERVABLE`, 
`TRANSACTION_OBSERVABLE`, `PENDING_TRANSACTION_OBSERVABLE`) let web3j call 
`eth_uninstallFilter` when the subscription is disposed. That is on stop, and 
for the block and transaction operations also when an inner 
`eth_getBlockByHash` / `eth_getTransactionByHash` fails (before the consumer 
subscribes again). If the uninstall fails, web3j's `Filter.cancel()` throws a 
`FilterException` from the `Cancellable` set in `JsonRpc2_0Rx.run`, and RxJava 
2 reports it as an `UndeliverableException` through `RxJavaPlugins.onError`. 
Camel cannot catch it: `dispose()` never throws. It is only noise; the consumer 
keeps working.
   
   **What changed:** a new section in `web3j-component.adoc`, 
"UndeliverableException when a filter is removed". It explains when it happens, 
links the upstream issue LFDT-web3j/web3j#1937, and shows an 
`RxJavaPlugins.setErrorHandler(...)` (RxJava 2, `io.reactivex`, as used by 
web3j 6.1.0) that logs `UndeliverableException` caused by 
`org.web3j.protocol.core.filters.FilterException` at DEBUG and handles other 
errors as RxJava does by default.
   
   **Generated files:** the catalog copy 
`catalog/camel-catalog/.../docs/web3j-component.adoc` is updated.
   
   **Not changed:** no JVM-wide RxJava handler installed by the component, and 
no Camel-built filter Flowables (options 2 and 3 on the JIRA): both have worse 
side effects. No tests (docs only), no upgrade-guide entry (no behaviour 
change). The root cause will be proposed upstream on web3j#1937.
   
   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to