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

Add multi-message produce feature #791

Merged
merged 6 commits into from
Sep 16, 2021
Merged

Add multi-message produce feature #791

merged 6 commits into from
Sep 16, 2021

Conversation

xpr3sso
Copy link
Contributor

@xpr3sso xpr3sso commented Aug 14, 2021

Hi @tchiotludo,

This feature allows the user to input multiple records as key-value pairs at once as one-liners like:

key1:{"value": 41}
key2:{"value": 42}

or

key1_{"value": 41};key2_{"value": 42}

This can help when dealing with larger sets of generated data - there is a limit for the request size, though :D
Multiple key-value separators can be chosen from, to support various naming conventions people might have.

Looks like this on the front end:
image
The "Key" field gets disabled when "Multiple messages" is selected, the multi-message fields for standard "Single message" producing. Placeholders for both modes are added to give some guidance.

What do you say? Could this be useful in general?

@tchiotludo
Copy link
Owner

Hi :)
I think it's a cool features ! Thanks for this one :)
My first impression (without a lot of reflexion) :
Maybe we can use a standard method for this multiple message (in order to handle key ?
Maybe :

key1,{"id": "123"}
key2,{"id": "456"}

or

{"key": "key1","value": {"id": "123"}}
{"key": "key2","value": {"id": "456"}}

A simple checkbox for multiple message, and we display a notice about the format needed ?

What do you think about that ?

@xpr3sso
Copy link
Contributor Author

xpr3sso commented Aug 14, 2021

Good idea! The checkbox combined with a text field for the separator would do the job. Let me check and get back to you :)
The second example would save some trouble with splitting the values manually, but also adds some overhead - e.g. when you think of copying some lines from a spreadsheet to produce them.

@xpr3sso
Copy link
Contributor Author

xpr3sso commented Aug 20, 2021

Alright, was just able to try some layout variants. This is how the result looks like:
image
Looks way cleaner and key-value pairs can be split with any char(-combination) the user provides ;)

@tchiotludo
Copy link
Owner

@xpr3sso : does this one can be review ?

@xpr3sso
Copy link
Contributor Author

xpr3sso commented Sep 5, 2021

Hi @tchiotludo,
yes, should be ready for review now :) No quite sure why some tests are failing now, though.

@tchiotludo tchiotludo merged commit 387b9e6 into tchiotludo:dev Sep 16, 2021
@tchiotludo
Copy link
Owner

thanks @xpr3sso works great 👍

tchiotludo pushed a commit that referenced this pull request Oct 24, 2021
Co-authored-by: xpr3sso <xpr3sso@noreply.org>
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.

2 participants