<commit_before><%
options = %w{allow_anonymous autosave_interval connection_messages retained_persistence tls_version cafile certfile capath crlfile ciphers keyfile require_certificate use_identity_as_username upgrade_outgoing_qos user sys_interval store_clean_interval retry_interval queue_qos0_messages psk_file pid_file persistent_client_expiration persistence_file persistence_location persistence password_file message_size_limit max_queued_messages max_inflight_messages log_timestamp include_dir clientid_prefixes autosave_on_changes auth_plugin allow_duplicate_messages acl_file}
bridge_options = %w{ connection address cleansession try_private username password threshold start_type round_robin keepalive_interval idle_timeout notifications notification_topic bridge_cafile bridge_capathbridge_certfile bridge_identity bridge_insecure bridge_keyfile}
%>

<% options.select{|x|node['mosquitto'].has_key?(x) && !node['mosquitto'][x].nil?}.each do |option| %>
<%= option %> <%= node['mosquitto'][option] %>
<% end %>

log_dest stderr
log_dest topic
log_type error
log_type warning
log_type notice
log_type information
log_type all
log_type debug

<% node['mosquitto']['listeners'].each do |listener| %>
listener <%= [listener[:port], listener[:addr]].compact.join(" ") %>
<% end %><commit_msg>Add websockets protocol as per http://jpmens.net/2014/07/03/the-mosquitto-mqtt-broker-gets-websockets-support/<commit_after><%
options = %w{allow_anonymous autosave_interval connection_messages retained_persistence tls_version cafile certfile capath crlfile ciphers keyfile require_certificate use_identity_as_username upgrade_outgoing_qos user sys_interval store_clean_interval retry_interval queue_qos0_messages psk_file pid_file persistent_client_expiration persistence_file persistence_location persistence password_file message_size_limit max_queued_messages max_inflight_messages log_timestamp include_dir clientid_prefixes autosave_on_changes auth_plugin allow_duplicate_messages acl_file}
bridge_options = %w{ connection address cleansession try_private username password threshold start_type round_robin keepalive_interval idle_timeout notifications notification_topic bridge_cafile bridge_capathbridge_certfile bridge_identity bridge_insecure bridge_keyfile}
%>

<% options.select{|x|node['mosquitto'].has_key?(x) && !node['mosquitto'][x].nil?}.each do |option| %>
<%= option %> <%= node['mosquitto'][option] %>
<% end %>

log_dest stderr
log_dest topic
log_type error
log_type warning
log_type notice
log_type information
log_type all
log_type debug

<% node['mosquitto']['listeners'].each do |listener| %>
listener <%= [listener[:port], listener[:addr]].compact.join(" ") %>
<% if listener[:protocol] %>protocol <%= listener[:protocol] %><% end %>
<% end %>
{'fraction_non_alphanumeric': 0.08815028901734104, 'fraction_numerical': 0.0036127167630057803, 'mean_word_length': 9.60919540229885, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4652663', 'n_tokens_mistral': 849, 'n_tokens_neox': 793, 'n_words': 186}