Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

Send concrete messages instead of random ones - #48

Open
marcosmercuri wants to merge 4 commits into
jamiealquiza:masterfrom
marcosmercuri:master
Open

Send concrete messages instead of random ones#48
marcosmercuri wants to merge 4 commits into
jamiealquiza:masterfrom
marcosmercuri:master

Conversation

@marcosmercuri

Copy link
Copy Markdown

Added a new parameter messages-data, which is a string with a concrete fix message to send.
This parameter can be repeated as many time as wanted. The messages will be sent one by one, and when the list is finished, it starts again from the beginning.

Example:
$>sangrenel -topic test --messages-data "{\"field1\":{\"field2\":\"value\"}}" -messages-data "{\"field3\":\"value2\"}"

Will send first the "{"field1":{"field2":"value"}}" message, and then "{"field3":"value2"}", and then again "{"field1":{"field2":"value"}}", and so on.

@jamiealquiza

jamiealquiza commented Jul 21, 2020

Copy link
Copy Markdown
Owner

Great, this is on track with one of the features I never quite got around to. One thing I had in mind was to have special field identifiers that could translate to non-static data, such as a timestamp field or random data field. The timestamp option is self-explanatory, but for the random data field, I was thinking something like a @data[50] sort of specifier that'd result in 50 bytes of random data for that field.

Two things this would solve:

  • Partition hot-spots if a routing key is eventually used
  • Unrealistically high compression ratios on repeat / static data

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants