<commit_before>:hivemq-link: http://www.hivemq.com
:hivemq-plugin-docs-link: http://www.hivemq.com/docs/plugins/1.4.0/
:hivemq-plugin-docs-archetype-link: http://www.hivemq.com/docs/plugins/1.4.0/#maven-archetype-chapter
:hivemq-blog-tools: http://www.hivemq.com/overview-of-mqtt-client-tools/
:hivemq-callbacks-overview-link: http://www.hivemq.com/docs/plugins/1.4.0/#hivemqdocs_overview_of_all_callbacks
:github-low-level-callbacks: https://github.com/hivemq/hivemq-spi/tree/master/src/main/java/com/dcsquare/hivemq/spi/callback/lowlevel

== HiveMQ Hello World Plugin

=== Purpose

This Hello World plugin can be used as a foundation for writing your (first) {hivemq-link}[HiveMQ] plugin. Although {hivemq-plugin-docs-archetype-link}[there is a Maven Archetype available] to generate your Hello World plugin right from the IDE, you can use this example project if you don't like to use the Archetype.

We strongly recommend to read the {hivemq-plugin-docs-link}[HiveMQ Plugin Documentation] to grasp the core concepts of HiveMQ plugin development.

=== What you'll get

This Hello World plugin implements a few HiveMQ Callbacks to get you started:

* A callback when a client connects
* A callback when a client disconnects
* A callback when a client publishes something
* A callback when HiveMQ starts


Also, this hello world plugin can reads configurations from a properties file (and reloads it every 5 minutes).

There's a Maven profile configured which starts HiveMQ with your plugin. Just enable the profile and run the +package+ Maven phase.

IMPORTANT: Don't forget to set the path to your HiveMQ installation in the +pom.xml+. There's a "FIXME:" in the +pom.xml+ to remind you of that.

The plugin is documented with javadoc which explains what's going on. Please don't forget to read the extensive {hivemq-plugin-docs-link}[HiveMQ Plugin Documentation].

=== Trying the plugin

. Execute the +package+ goal from Maven with the profile _RunWithHiveMQ_ activated. (Need help?: Consult: http://maven.apache.org/guides/introduction/introduction-to-profiles.html)
. Now HiveMQ should be running *with* your plugin installed.
. Connect with a {hivemq-blog-tools} MQTT client of your choice and publish something. You should see some log output.


=== Next steps

Awesome, you got your first HiveMQ plugin working. Now grab a coffee and prepare for the next steps:

* Read about the available HiveMQ callbacks {hivemq-callbacks-overview-link}[here]. footnote:[There are also low level protocol callbacks available. See {github-low-level-callbacks}[https://github.com/hivemq/hivemq-spi/tree/master/src/main/java/com/dcsquare/hivemq/spi/callback/lowlevel]]
* Implement a great plugin. Bring your JDBC driver and do some database fun. Integrate with your favourite web service. There are no limits :-)
* Blog about your awesome plugin. Tell us and if you like we can add your plugin to the plugin registry on http://www.hivemq.com<commit_msg>fixed formatting bugs in doc<commit_after>:hivemq-link: http://www.hivemq.com
:hivemq-plugin-docs-link: http://www.hivemq.com/docs/plugins/1.4.0/
:hivemq-plugin-docs-archetype-link: http://www.hivemq.com/docs/plugins/1.4.0/#maven-archetype-chapter
:hivemq-blog-tools: http://www.hivemq.com/overview-of-mqtt-client-tools/
:hivemq-callbacks-overview-link: http://www.hivemq.com/docs/plugins/1.4.0/#hivemqdocs_overview_of_all_callbacks
:github-low-level-callbacks: https://github.com/hivemq/hivemq-spi/tree/master/src/main/java/com/dcsquare/hivemq/spi/callback/lowlevel

== HiveMQ Hello World Plugin

=== Purpose

This Hello World plugin can be used as a foundation for writing your (first) {hivemq-link}[HiveMQ] plugin. Although {hivemq-plugin-docs-archetype-link}[there is a Maven Archetype available] to generate your Hello World plugin right from the IDE, you can use this example project if you don't like to use the Archetype.

We strongly recommend to read the {hivemq-plugin-docs-link}[HiveMQ Plugin Documentation] to grasp the core concepts of HiveMQ plugin development.

=== What you'll get

This Hello World plugin implements a few HiveMQ Callbacks to get you started:

* A callback when a client connects
* A callback when a client disconnects
* A callback when a client publishes something
* A callback when HiveMQ starts


Also, this hello world plugin can reads configurations from a properties file (and reloads it every 5 minutes).

There's a Maven profile configured which starts HiveMQ with your plugin. Just enable the profile and run the +package+ Maven phase.

IMPORTANT: Don't forget to set the path to your HiveMQ installation in the +pom.xml+. There's a "FIXME:" in the +pom.xml+ to remind you of that.

The plugin is documented with javadoc which explains what's going on. Please don't forget to read the extensive {hivemq-plugin-docs-link}[HiveMQ Plugin Documentation].

=== Trying the plugin

. Execute the +package+ goal from Maven with the profile _RunWithHiveMQ_ activated. (Need help?: Consult: http://maven.apache.org/guides/introduction/introduction-to-profiles.html)
. Now HiveMQ should be running *with* your plugin installed.
. Connect with a {hivemq-blog-tools}[MQTT client] of your choice and publish something. You should see some log output.


=== Next steps

Awesome, you got your first HiveMQ plugin working. Now grab a coffee and prepare for the next steps:

* Read about the available HiveMQ callbacks {hivemq-callbacks-overview-link}[here]. (There are also low level protocol callbacks available. See {github-low-level-callbacks}[https://github.com/hivemq/hivemq-spi/tree/master/src/main/java/com/dcsquare/hivemq/spi/callback/lowlevel])
* Implement a great plugin. Bring your JDBC driver and do some database fun. Integrate with your favourite web service. There are no limits :-)
* Blog about your awesome plugin. Tell us and if you like we can add your plugin to the plugin registry on http://www.hivemq.com
{'fraction_non_alphanumeric': 0.09140240800406986, 'fraction_numerical': 0.003391555027980329, 'mean_word_length': 4.617142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 12, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3973503', 'n_tokens_mistral': 1840, 'n_tokens_neox': 1741, 'n_words': 670}