ZupIT/ritchie-formulas

[FORMULA] Messaging Queue Mock builder

Opened this issue · 1 comments

What would you like to be added:

  • I'd like to ask for a mock queue command, which would make easier to create scenarios for the consumer/producer services patterns.
  • This would be great for: Developer, Debugging, Testing (Manually or CI integrated - E2E testing)
  • Popular queues/messaging: Sqs, Kafka, ZeroMQ, RabbitMq, AMQP

Instructions (Using SQS as example):

As a User, I'd like to create a FIFO queue for testing a producer integration with SalesForce.

What I'd need to do without ritchie:

  • Knowledge in AWS CLI
  • Knowledge in docker
  • Find out an sqs container (alpine/sqs) and creating a yaml for that
  • Knowledge to parse my JSON files to the AWS CLI add the messages to the queue
  • If I do not know the previous step, I'd need to run the producer and insert it

How ritchie can help me:

  • Command name (suggestion) rit create mock queue sqs
  • Would read a sqs-config.json

// Suggesting a generic config file, you could use the same JSON schema template for kafka, i.e: kafka-config.json
sqs-config.json

{
	docker: {
		port
		volume
		etc ..
	}
	queue: {
		type: ENUM -> SQS_STANDARD|SQS_FIFO|KAFKA_TOPIC|ZMQ_DEALER|ZMQ_SUBSCRIBER|ZMQ_TOPIC
	}
	data: [
		{key: value} <= Producer data that would be sent to the queue
	]
}

The data would be inserted in my SQS FIFO Queue, so I'd just need to RUN my producer and checkout the logs / SalesForce

Why is this needed:

  • This could save a lot of trouble/time setting up a Queue for testing & developing purposes
  • This could be integrated on a CI for E2E testing
  • Less infrastructure knowledge required for the developer/tester

Issue prioritized by the Adoption team