Thanks for sharing realistic examples of ZIO usage!
I have a couple suggestions:
SQSClient.instantiate calls AWS API which could throw an exception, so it would be better to wrap this code inside Task { }
- in
Main, the whole ZIO.environment[AppEnvironment].flatMap { _ => seems unnecessary, since you're not using the environment. messageSentConsumer already has the constraint of providing an AppEnvironment so you don't need to add this.
Thanks for sharing realistic examples of ZIO usage!
I have a couple suggestions:
SQSClient.instantiatecalls AWS API which could throw an exception, so it would be better to wrap this code insideTask { }Main, the wholeZIO.environment[AppEnvironment].flatMap { _ =>seems unnecessary, since you're not using the environment.messageSentConsumeralready has the constraint of providing anAppEnvironmentso you don't need to add this.