-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TH2-5073] Ability to send RawMessage directly to conn components. #121
Conversation
responseObserver.onNext(response); | ||
responseObserver.onCompleted(); | ||
|
||
} catch (RuntimeException | IOException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should catch Exception
here. Otherwise, we might no complete the call and it will be stuck until the application is down
build.gradle
Outdated
@@ -94,7 +94,7 @@ dependencies { | |||
|
|||
implementation 'com.exactpro.th2:common:5.4.0-dev' | |||
implementation 'com.exactpro.th2:common-utils:2.2.0-dev' | |||
implementation 'com.exactpro.th2:grpc-act-template:4.1.0' | |||
implementation 'com.exactpro.th2:grpc-act-template:4.1.0-TH2-5073+' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to release version before merging
@@ -90,6 +97,7 @@ | |||
|
|||
public class ActHandler extends ActImplBase { | |||
private static final int DEFAULT_RESPONSE_TIMEOUT = 10_000; | |||
private static final String SEND_RAW_QUEUE_ATTRIBUTE = "send_raw"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add information about this to README file (maybe with an example)
private com.exactpro.th2.common.grpc.Event createSendRawMessageEvent(RawMessage message, EventID parentEventId) throws IOException { | ||
String bodyString = message.getBody().toString(StandardCharsets.UTF_8); | ||
Event event = start() | ||
.name("Send '" + bodyString + "' message to connectivity"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put full raw data into event body instead of name
@@ -517,6 +610,17 @@ private com.exactpro.th2.common.grpc.Event createSendMessageEvent(ParsedMessage | |||
return event.toProto(parentEventId); | |||
} | |||
|
|||
private com.exactpro.th2.common.grpc.Event createSendRawMessageEvent(RawMessage message, EventID parentEventId) throws IOException { | |||
String bodyString = message.getBody().toString(StandardCharsets.UTF_8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create text like hexdump util
hexdump -C two_file_top.log | head
00000000 74 6f 70 20 2d 20 31 35 3a 32 33 3a 35 30 20 75 |top - 15:23:50 u|
00000010 70 20 31 37 20 6d 69 6e 2c 20 20 32 20 75 73 65 |p 17 min, 2 use|
00000020 72 73 2c 20 20 6c 6f 61 64 20 61 76 65 72 61 67 |rs, load averag|
build.gradle
Outdated
@@ -94,7 +94,7 @@ dependencies { | |||
|
|||
implementation 'com.exactpro.th2:common:5.4.0-dev' | |||
implementation 'com.exactpro.th2:common-utils:2.2.0-dev' | |||
implementation 'com.exactpro.th2:grpc-act-template:4.1.0-TH2-5073+' | |||
implementation 'com.exactpro.th2:grpc-act-template:4.2.0-dev' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this was also published as 4.2.0
. So, probably we should use release version instead of dev-release
No description provided.