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

Send concrete messages instead of random ones #48

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

marcosmercuri
Copy link

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
Copy link
Owner

jamiealquiza commented Jul 21, 2020

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants