BUG REPORT
-
Please describe the issue you observed:
-
What did you do (The steps to reproduce)?
-
What did you expect to see?
-
What did you see instead?
Run the test below
func TestMessageKey(t *testing.T) {
msg := &Message{}
expected := "testKey"
msg.WithKeys([]string{expected})
actual := msg.GetKeys()
if actual != expected {
t.Fatalf("get message key error: expected is '%s', actual is '%s'", expected, actual)
}
}
Expect msg.GetKeys() returns the same key as what msg.WithKeys() put.
msg.WithKeys() append an unexpected key separator ' ' to the message key instead.
The test outputs get message key error: expected is 'testKey', actual is 'testKey '
-
Please tell us about your environment:
master code of rocketmq-client-go