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

Allow to import messages from file/directly in RabbitMQ Preset #59

Closed
orlangure opened this issue Oct 3, 2020 · 2 comments · Fixed by #66
Closed

Allow to import messages from file/directly in RabbitMQ Preset #59

orlangure opened this issue Oct 3, 2020 · 2 comments · Fixed by #66
Assignees
Labels
enhancement New feature or request hacktoberfest Contributions as a part of Hacktoberfest are welcome! help wanted Extra attention is needed swagger Changes required to OpenAPI specification and SDK updates

Comments

@orlangure
Copy link
Owner

RabbitMQ Preset is missing a key feature: automated and simplified message ingestion upon startup. See Kafka preset for example:

// WithMessages makes sure that these messages can be consumed during the test
// once the container is ready.
func WithMessages(messages ...Message) Option {
	return func(o *P) {
		o.Messages = append(o.Messages, messages...)
	}
}

// WithMessagesFile allows to load messages to be sent into Kafka from one or
// multiple files.
func WithMessagesFile(files string) Option {
	return func(o *P) {
		o.MessagesFiles = append(o.MessagesFiles, files)
	}
}

Implementing this feature should allow users to provide a text file with messages in JSON format, or specify message objects directly using WithMessages option. When RabbitMQ container is ready, these messages should be already ready to consume.

In this issue, an InitFunc should be added to preset code. This function should be applied only when there are messages or message files, just like in Kafka.

Just like with any other preset development, please try to cover all the cases mentioned in contribution guide.

@orlangure orlangure added enhancement New feature or request help wanted Extra attention is needed swagger Changes required to OpenAPI specification and SDK updates hacktoberfest Contributions as a part of Hacktoberfest are welcome! labels Oct 3, 2020
@dusansimic
Copy link
Contributor

Hi again 😀, I'd like to work on this one too.

@orlangure
Copy link
Owner Author

Thanks @dusansimic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest Contributions as a part of Hacktoberfest are welcome! help wanted Extra attention is needed swagger Changes required to OpenAPI specification and SDK updates
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants