Comments (1)
I have these lines of code I think work pretty well. However, for some reason the onTerminate is reached every few minutes. Can someone tell me what's happening? Is there something wrong with the code?
try {
Main.waitForNetWork();
tradeLogger.info("starting " + coin + "/BTC orderbook upbit");
Flux<com.njkim.reactivecrypto.core.common.model.order.OrderBook> orderBookFlux = exchangeWebsocketClient.createDepthSnapshot(Collections.singletonList(com.njkim.reactivecrypto.core.common.model.currency.CurrencyPair.parse(coin, "BTC"))).doOnNext(orderBook -> {
try {
//......
} catch (Exception e) {
StringWriter stringWriter = new StringWriter();
PrintWriter printWriter = new PrintWriter(stringWriter);
e.printStackTrace(printWriter);
CoinRunnable.tradeLogger.info(stringWriter.toString());
} finally {
}
}).doOnTerminate(() -> {
CoinRunnable.tradeLogger.info(coin + "terminated");
throw new RuntimeException();
}).doOnError(throwable -> {
// throw new RuntimeException();
});
orderBookFlux.blockLast();
System.out.println("last reached");
} catch (Exception e) {
StringWriter stringWriter = new StringWriter();
PrintWriter printWriter = new PrintWriter(stringWriter);
e.printStackTrace(printWriter);
CoinRunnable.tradeLogger.info(stringWriter.toString());
}
}```
from reactive-crypto.
Related Issues (20)
- Add new exchange coinall
- kraken orderbook stream synchronization error
- New Exchange Bhex
- New Exchange Bitz
- could not get maven resources from jitpack maven repository HOT 5
- Does this library support auto re connection of Binance websocket when the network connection drops? HOT 2
- Add the dependency fails (Gradle builder) HOT 2
- BinanceWebsocketClient inheritance / unsubscribe from stream websocket HOT 3
- I am noob in as an android developer so please let me know how I can implement it in an android app?
- New exchange gate.io
- New exchange idax
- Publish to Maven Central
- New Exchange Bitmax
- New exchange coineal
- Bithumb multiple pair subscribe issue
- OrderBook synchronization fails on reconnection
- New exchange bitstamp
- Coineal open order error
- Okex Korea ws client doean't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactive-crypto.