title: Design pattern to process different messages based on message type
body: <p>I need to process notification messages that gets pushed to my application. where the messages contain notification types like <code>catalog_purchased, catalog_expired, catalog_denied</code> etc. and In future new set of notification types would be added as well.
  What would be a good Design Pattern (and any Java 8 features) to process all these messages based on Notification types instead of just using if-else blocks?</p>
  
  <pre><code>public class CustomMessage(){
    private String messageType;
    private Message message;
  }
  public void pushedMessage(CustomMessage message){
     //*TO-DO* need to implement code that handles one message at a time
  } 
  </code></pre>