@startuml
package com.iluwatar.poison.pill {
  class App {
    + App()
    + main(args : String[]) {static}
  }
  class Consumer {
    - LOGGER : Logger {static}
    - name : String
    - queue : MqSubscribePoint
    + Consumer(name : String, queue : MqSubscribePoint)
    + consume()
  }
  interface Message {
    + POISON_PILL : Message {static}
    + addHeader(Headers, String) {abstract}
    + getBody() : String {abstract}
    + getHeader(Headers) : String {abstract}
    + getHeaders() : Map<Headers, String> {abstract}
    + setBody(String) {abstract}
  }
  enum Headers {
    + DATE {static}
    + SENDER {static}
    + valueOf(name : String) : Headers {static}
    + values() : Headers[] {static}
  }
  interface MessageQueue {
  }
  interface MqPublishPoint {
    + put(Message) {abstract}
  }
  interface MqSubscribePoint {
    + take() : Message {abstract}
  }
  class Producer {
    - LOGGER : Logger {static}
    - isStopped : boolean
    - name : String
    - queue : MqPublishPoint
    + Producer(name : String, queue : MqPublishPoint)
    + send(body : String)
    + stop()
  }
  class SimpleMessage {
    - body : String
    - headers : Map<Headers, String>
    + SimpleMessage()
    + addHeader(header : Headers, value : String)
    + getBody() : String
    + getHeader(header : Headers) : String
    + getHeaders() : Map<Headers, String>
    + setBody(body : String)
  }
  class SimpleMessageQueue {
    - queue : BlockingQueue<Message>
    + SimpleMessageQueue(bound : int)
    + put(msg : Message)
    + take() : Message
  }
}
SimpleMessageQueue -->  "-queue" Message
Headers ..+ Message
Consumer -->  "-queue" MqSubscribePoint
Producer -->  "-queue" MqPublishPoint
Message -->  "-POISON_PILL" Message
MessageQueue --|> MqPublishPoint 
MessageQueue --|> MqSubscribePoint 
SimpleMessage ..|> Message 
SimpleMessageQueue ..|> MessageQueue 
@enduml