Burak Aktas Software Engineer

Build Serverless Disposable Email Address Architecture on AWS

In this tutorial I will walk through about building a disposable email address architecture on AWS for received emails. We will be able intercept emails and process their attributes like subject, body, attachments etc. Nowadays, there are so many online products requires a valid email to send a verification code to complete registration. In these cases you may not want to give your personal or work email which you can have a disposable email address for these kind of temporary operations.

  1. Intercept incoming emails and filter through defined rule set in AWS SES.
  2. Save email with its contents into S3.
  3. Invoke an AWS Lambda function to process received email by getting email contents from S3 with its messageId.

Spring Retry Tutorial

In this tutorial I will talk about some retry examples in Spring and how to do it. Retry logic or in other words retry strategies are being used when an operation is failed and we want to basically retry that operation again by a logic. Most of the software systems are doing external calls, operations etc. which are dependent on other systems or resources. For example, charging a client by sending a charge request to Stripe, sending a message to Amazon SQS queue which might failed for a short time due to a transitive issue. Instead of, failing the process at the very first try we can basically have a retry strategy to try the current operation multiple times to continue current process without any issue. In Spring, there are multiple ways to define how to retry on some operation.

CDI Dependency Injection @PostConstruct and @PreDestroy Example

We have seen how to inject cdi beans by using qualifiers and producers so far. Additionally, every cdi bean has a lifecycle, and we can initialize and prepare to destroy any managed bean by using two common annotations; @PostConstruct and @PreDestroy. Methods annotated with these annotations are called bean lifecycle callbacks.

Java Enums Tutorial

Enums (Enumeration) are introduced as a new reference type in Java 1.5 with a bunch of beneficial features. They consist of fix set of constants (each constant is implicitly labeled as public static final) which each constant can have a data-set. Lets see the simplest example of an Enum;

CDI Dependency Injection Producer Method Example

In this tutorial we will see how to use producer methods for injecting CDI beans by using @Produces annotation. We will use Weld CDI implementation. Using producer methods provides a programmatic way to solve disambiguation by using injection points. We have already seen how to solve disambiguation by using qualifiers in this tutorial. As a first step, we will create a disambiguation.