Skip to content
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

java middleware with kafka out(json-format) miss req_boy #1199

Open
1528992118 opened this issue Jun 6, 2023 · 0 comments
Open

java middleware with kafka out(json-format) miss req_boy #1199

1528992118 opened this issue Jun 6, 2023 · 0 comments

Comments

@1528992118
Copy link

1528992118 commented Jun 6, 2023

I am having a problem with goreplay version 1.3.2. When I used java middleware as a custom filter and exported to kafka, I found that the req_body was missing and I added a custom http header to the original message. here is the modified message after using java middleware

2 93941f900af407140afc1266 1686069659605231722 92821
HTTP/1.1 200 OK
transfer-encoding: chunked
X-TraceId: 840f302dbe741ea1
X-SpanId: 840f302dbe741ea1
Content-Type: application/json;charset=UTF-8
Date: Tue, 06 Jun 2023 16:40:59 GMT
X-Tenant-Id: 864f7539264b4c48993b997850737fc2

1b
{"data":[],"errorCode":"0"}
0


🐵🙈🙉

The http header X-Tenant-Id above is my custom addition,here are the messages in Kakfa

{
	"Req_URL": "",
	"Req_Type": "2",
	"Req_ID": "93941f900af407140afc1266",
	"Req_Ts": "1686069659605231722",
	"Req_Method": "HTTP/1.1",
	"Req_Headers": {
		"Content-Type": "application/json",
		"Date": "Tue, 06 Jun 2023 16:40:59 GMT",
		"Transfer-Encoding": "chunked",
		"X-Spanid": "840f302dbe741ea1",
		"X-Tenant-Id": "864f7539264b4c48993b997850737fc2",
		"X-Traceid": "840f302dbe741ea1"
	}
}

my Launch Script

./gor --input-raw :8080 --input-raw-track-response --middleware "java -jar goreplay-java.jar" --output-kafka-json-format --output-kafka-host 'ccf-uat-9-kafka-0.ccf-uat-9-kafka-headless.ccf-uat-9.svc.cluster.local:9092,ccf-uat-9-kafka-1.ccf-uat-9-kafka-headless.ccf-uat-9.svc.cluster.local:9092,ccf-uat-9-kafka-2.ccf-uat-9-kafka-headless.ccf-uat-9.svc.cluster.local:9092' --output-kafka-topic 'uat_gor'

Is this a bug or does goreplay do a checksum that doesn't allow modification of the original message? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant