title: How to notify my server application?
body: <p>I'm sending some files, periodically, to my <code>bucket</code> on <code>Amazon S3</code>. However, I need to <strong>notify</strong> my <strong>servers</strong> that my bucket was <strong>updated</strong>, so they can <strong>download</strong> the new files.</p>
  
  <p>I would like to implement a <strong>push</strong> and <strong>pull</strong> approach, or something like that.
  I'm thinking about bulding an <code>ActiveMQ</code> environment, to work with <code>topics</code>. Nevertheless, I wonder if it's <strong>really necessary</strong>, maybe I'm overreacting with this problem and you guys might have a simpler solution for this.</p>
  
  <p><strong>[EDIT]</strong></p>
  
  <p>I have been trying to do something really simple with <code>shell</code>, so far I got this:</p>
  
  <pre><code>#!/bin/bash
  
  set -x
  
  CLIENTID=$(hostname -f)
  MOM_ADDRESS="mom.company.solutions"
  DESTINATION="Company.Product.Sync"
  TYPE="topic"
  
  USER="admin"
  PASSWORD="admin"
  
  # USER="user"
  # PASSWORD="user"
  
  produce(){
      curl -u "${USER}":"${PASSWORD}" -d "body=${MESSAGE}" "http://${MOM_ADDRESS}:8161/api/message/${DESTINATION}?type=${TYPE}"
  }
  
  
  consume(){
      while [ true ];
      do
          wget --user "${USER}" --password "${PASSWORD}" "http://${MOM_ADDRESS}:8161/api/message/${DESTINATION}?type=${TYPE}&amp;clientId=${CLIENTID}"
          sleep 5
      done
  }
  
  case "${1}" in
      produce)
          MESSAGE="${2}"
          produce
          ;;
      consume) 
          consume
          ;;
      *)
          echo "Usage: jasper {produce|consume}"
          exit 1
          ;;
  esac
  </code></pre>
  
  <p>Usage:</p>
  
  <pre><code>./queue produce './sync download'
  ./queue consume
  </code></pre>