title: Twitter Streaming API rate limit..How to deal with it?
body: <p>Will Twitter Streaming API stream run uninterrupted if the I left this code running for around 3 weeks? Or do I need to keep track of rate limit and if I do how could I do that?</p>
  
  <pre><code> import twitter4j.*
  
   public class SimpleStream {
   public static void main(String[] args) {
      ConfigurationBuilder cb = new ConfigurationBuilder();
      cb.setDebugEnabled(true);
      cb.setOAuthConsumerKey("******");
      cb.setOAuthConsumerSecret("*****");
      cb.setOAuthAccessToken("********");
      cb.setOAuthAccessTokenSecret("******************");
  
      TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance();
  
      StatusListener listener = new StatusListener() {
  
  
          @Override
          public void onStatus(Status status) {
              User user = status.getUser();
  
  
              String username = status.getUser().getScreenName();
              System.out.println("Screen name: " + username);
  
              String name = status.getUser().getName();
              System.out.println("User's real name: " + name);
  
              long user_id = status.getUser().getId();
              System.out.println("Users_id: " + user_id); 
  
          }
  
      };
  
      twitterStream.addListener(listener);
      twitterStream.sample();
  
  
      }
    }
  </code></pre>