mod rust log
This commit is contained in:
parent
27c44318b6
commit
d72e0307f0
|
@ -180,6 +180,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
// ANCHOR: unsubscribe
|
||||
consumer.unsubscribe().await;
|
||||
println!("consumer unsubscribed successfully.");
|
||||
// ANCHOR_END: unsubscribe
|
||||
|
||||
tokio::time::sleep(Duration::from_secs(1)).await;
|
||||
|
|
|
@ -72,10 +72,10 @@ public class ConsumerLoopFull {
|
|||
|
||||
} catch (SQLException ex) {
|
||||
// handle any errors, please refer to the JDBC specifications for detailed exceptions info
|
||||
System.out.println("Failed to poll data; ErrCode:" + ex.getErrorCode() + "; ErrMessage: " + ex.getMessage());
|
||||
System.out.println("Failed to poll data, ErrCode:" + ex.getErrorCode() + "; ErrMessage: " + ex.getMessage());
|
||||
throw new SQLException("Failed to poll data", ex);
|
||||
} catch (Exception ex) {
|
||||
System.out.println("Failed to poll data; ErrMessage: " + ex.getMessage());
|
||||
System.out.println("Failed to poll data, ErrMessage: " + ex.getMessage());
|
||||
throw new SQLException("Failed to poll data", ex);
|
||||
}
|
||||
// ANCHOR_END: poll_data_code_piece
|
||||
|
@ -149,7 +149,7 @@ public class ConsumerLoopFull {
|
|||
try {
|
||||
// unsubscribe the consumer
|
||||
consumer.unsubscribe();
|
||||
System.out.println("unsubscribe consumer successfully.");
|
||||
System.out.println("consumer unsubscribed successfully.");
|
||||
} catch (SQLException ex) {
|
||||
// handle any errors, please refer to the JDBC specifications for detailed exceptions info
|
||||
System.out.println("Failed to unsubscribe consumer. ErrCode:" + ex.getErrorCode() + "; ErrMessage: " + ex.getMessage());
|
||||
|
|
|
@ -70,10 +70,10 @@ public class WsConsumerLoopFull {
|
|||
|
||||
} catch (SQLException ex) {
|
||||
// handle any errors, please refer to the JDBC specifications for detailed exceptions info
|
||||
System.out.println("Failed to poll data; ErrCode:" + ex.getErrorCode() + "; ErrMessage: " + ex.getMessage());
|
||||
System.out.println("Failed to poll data, ErrCode:" + ex.getErrorCode() + "; ErrMessage: " + ex.getMessage());
|
||||
throw new SQLException("Failed to poll data", ex);
|
||||
} catch (Exception ex) {
|
||||
System.out.println("Failed to poll data; ErrMessage: " + ex.getMessage());
|
||||
System.out.println("Failed to poll data, ErrMessage: " + ex.getMessage());
|
||||
throw new SQLException("Failed to poll data", ex);
|
||||
}
|
||||
// ANCHOR_END: poll_data_code_piece
|
||||
|
@ -147,7 +147,7 @@ public class WsConsumerLoopFull {
|
|||
try {
|
||||
// unsubscribe the consumer
|
||||
consumer.unsubscribe();
|
||||
System.out.println("unsubscribe consumer successfully.");
|
||||
System.out.println("consumer unsubscribed successfully.");
|
||||
} catch (SQLException ex) {
|
||||
// handle any errors, please refer to the JDBC specifications for detailed exceptions info
|
||||
System.out.println("Failed to unsubscribe consumer. ErrCode:" + ex.getErrorCode() + "; ErrMessage: " + ex.getMessage());
|
||||
|
|
Loading…
Reference in New Issue