Before running, the producer src/main/resources/application.properties will need to be edited to point to a directory in the file system where images will be placed. This is done with the following code:
images.input.directory=<Absolute Path To Images Directory>
Also, a directory by the name Done needs to created inside that directory:
$ cd <Absolute Path To Images Directory>
$ mkdir Done
After building everything, the following commands can be used to run the Image Resize Request Producer:
$ cd ../spring-boot-2-async-consumer
$ mvn spring-boot:run
The following screenshot shows an image in the directory configured by images.input.directory in the application.properties file:
The following screenshot shows resized images in the Done directory, which is inside the same directory specified in images.input.directory, along with the original image also:
The dimensions are prefixed for easier identification of the images. The original image is the courtesy of https://pixabay.com/en/young-elephants-baby-elephants-264711/.