<commit_before>## Overview

MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity
protocol. It was designed as an extremely lightweight publish/subscribe
messaging transport. It is useful for connections with remote locations where
a small code footprint is required and/or network bandwidth is at a premium.

mqtt-client provides an ASL 2.0 licensed API to MQTT. It takes care of
automatically reconnecting to your MQTT server and restoring your client
session if any network failures occur. Applications can use a blocking API
style, a futures based API, or a callback/continuations passing API style.

## Using from Maven

Add the following to your maven `pom.xml` file.

    <dependency>
      <groupId>org.fusesource.mqtt-client</groupId>
      <artifactId>mqtt-client</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>

    <repositories>
      <repository>
        <id>fusesource.snapshots</id>
        <name>FuseSource Snapshot Repository</name>
        <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
        <snapshots><enabled>true</enabled></snapshots>
        <releases><enabled>false</enabled></releases>
      </repository>
    </repositories>

## Using from any Other Build System

Download the uber 
[jar file](http://repo.fusesource.com/nexus/service/local/artifact/maven/redirect?r=snapshots&g=org.fusesource.mqtt-client&a=mqtt-client&v=1.0-SNAPSHOT&e=jar&c=uber) 
and add it to your build. The uber contains all the stripped down dependencies
which the mqtt-client depends on from other projects.

## Configuring the MQTT Connection

The blocking, future, and callback APIs all share the same connection setup.
You create a new instance of the `MQTT` class and configure it with connection
and socket related options. At a minimum the `setHost` method be called before<commit_msg>Document support for Java 1.4<commit_after>## Overview

MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity
protocol. It was designed as an extremely lightweight publish/subscribe
messaging transport. It is useful for connections with remote locations where
a small code footprint is required and/or network bandwidth is at a premium.

mqtt-client provides an ASL 2.0 licensed API to MQTT. It takes care of
automatically reconnecting to your MQTT server and restoring your client
session if any network failures occur. Applications can use a blocking API
style, a futures based API, or a callback/continuations passing API style.

## Using from Maven

Add the following to your maven `pom.xml` file.

    <dependency>
      <groupId>org.fusesource.mqtt-client</groupId>
      <artifactId>mqtt-client</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>

    <repositories>
      <repository>
        <id>fusesource.snapshots</id>
        <name>FuseSource Snapshot Repository</name>
        <url>http://repo.fusesource.com/nexus/content/repositories/snapshots</url>
        <snapshots><enabled>true</enabled></snapshots>
        <releases><enabled>false</enabled></releases>
      </repository>
    </repositories>

## Using from any Other Build System

Download the 
[uber jar file](http://repo.fusesource.com/nexus/service/local/artifact/maven/redirect?r=snapshots&g=org.fusesource.mqtt-client&a=mqtt-client&v=1.0-SNAPSHOT&e=jar&c=uber) 
and add it to your build. The uber contains all the stripped down dependencies
which the mqtt-client depends on from other projects.

## Using on Java 1.4 

We also provide an 
[java 1.4 uber jar file](http://repo.fusesource.com/nexus/service/local/artifact/maven/redirect?r=snapshots&g=org.fusesource.mqtt-client&a=mqtt-client-java1.4-uber&v=1.0-SNAPSHOT&e=jar) 
which is compatible with Java 1.4 JVMs.  This version of the jar
does not support SSL connections since the SSLEngine class used to implement SSL on NIO
was not introduced until Java 1.5.

## Configuring the MQTT Connection

The blocking, future, and callback APIs all share the same connection setup.
You create a new instance of the `MQTT` class and configure it with connection
and socket related options. At a minimum the `setHost` method be called before
{'fraction_non_alphanumeric': 0.08736462093862817, 'fraction_numerical': 0.006738868832731649, 'mean_word_length': 4.208020050125313, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1390756', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1193, 'n_words': 433}