A hundreds messages per second on OH2 & MQTT (Ubuntu)

Hello
I have a problem by using MQTT binding with OH2.
I’m using OpenHab 1.8 on Windows since a long time. Everything was fine. But now I decided to migrate to OH2. I bought new PC and install Linux Ubuntu Server 16.04 LTS. Then I installed java, mosquitto, and OH2. All of my devices work by MQTT. Then I installed MQTT binding.
I tested the broker by App in chrome. The broker works fine. I transferred the item file from OH1 to OH2. I configured MQTT and everything looks good.
I made new switch and I tested. Its working!
After all this I thought that everything is normal and I turned on one of my arduino controllers.
Then I saw in a log that OH2 didn’t receive all of messages with Arduino sending.
But more strange is OH2 start sending a hundreds messages per second of items status, wich is configured to be one way (OH2 have to receive only). Only way to stop this is to stop OH2 service or reboot the PC.
First I thought the problem is in my Arduino, although it’s worked with OH1.
But no! The same thing is happened when I sent one message from MQTT app on certain item (one way). If in app I subscribed this item I’m getting thousands messages for its status.

This is my config:
mqtt.cfg
mosquitto.url=tcp://192.168.100.5:1883
mosquitto.clientId=openhab
mosquitto.retain=true
mosquitto.async=false

mqtt-eventbus.cfg:
broker=mosquitto

mqtt-persistence.cfg:
broker=mosquitto

Any ideas?
Thank you in advance!

Did you try to use a different App or just turn it ON via. pub ?
Your text reads like.
If I use openHAB its okay,
Arduino is Okay.
I use the App and strange things happen.

mosquitto_pub -h 127.0.0.1 -t 'cmnd/Device01/Light' -m 'ON'

Hi
thank you for your answer
I have tested with another program for android. It is the same.
The problem is coming when the OH2 service is active. When it is inactive all work just fine.
Now I tested that you suggested - It is the same.
When I send one message (for example: Topic: Tk1, message: 25) from wherever, the openhab start sending messages.
I’m sure that the problem is in OH2, broker or in my configuration of OH2.
I think the arduino and the MQTT programs work fine, because I using them since a long time.
I forgot to post my items file:

Group heating (All)
Group irrigation (All)
//Group h_temperaturs (heating)
//Group h_pumps (heating)
//Group h_valves (heating)
//Group h_burners (heating)
Group sunheat (All)
Group boiler (ALL)
Group Heating_chart(ALL)
Group Temp_termostat_chart (Heating_chart)
Group RoomTemperatures(ALL)
Group:Switch:OR(ON, OFF) 		manual		"всички[(%d)]"
Number Heating_chart_Period "Период"
Number Temp_termostat_Period "Период"
Group Boiler_chart (Heating_chart)
Number Boiler_chart_Period "Период"
Group colector_chart  (Heating_chart)
Number colector_chart_Period "Период"
Group Heating_controls (Heating_chart)
Number Heating_state "Отопление" <inverter> (heating) {mqtt=">[mosquitto:Heating_state:command:*:default],<[mosquitto:Heating_state_stat:state:default]"}
Number termostatSettings "Използване на термостат" <heating> (heating){mqtt=">[mosquitto:termostatSettings:command:*:default],<[mosquitto:termostatSettings_stat:state:default]"}
Number termostat "Състояние термостат [%s]" <heating> (heating) {mqtt=">[mosquitto:termostat:command:*:default],<[mosquitto:termostat:state:default]"}
Number THeatingMod "Температура на водата [%.1f °C]" <radiator> (heating) {mqtt=">[mosquitto:THeatingMod:command:*:default],<[mosquitto:THeatingMod_stat:state:default]"}
Number THeatingMax "Макс. t° за отопление [%.1f °C]" <hot> (heating) {mqtt=">[mosquitto:THeatingMax:command:*:default],<[mosquitto:THeatingMax_stat:state:default]"}
Number THeatingMin "Мин. t° за отопление [%.1f °C]" <cold> (heating)  {mqtt=">[mosquitto:THeatingMin:command:*:default],<[mosquitto:THeatingMin_stat:state:default]"}
Number boiler_state "бойлер" <boilera> (boiler) {mqtt=">[mosquitto:boiler_state:command:*:default],<[mosquitto:boiler_state_stat:state:default]"}
Number heater_control_t_on "t° за вкл. ел. нагревател [%.1f °C]" <smartheater> (boiler) {mqtt=">[mosquitto:heater_control_t_on:command:*:default],<[mosquitto:heater_control_t_on_stat:state:default]"}
Number heater_control_t_off "t° за изкл. ел. нагревател [%.1f °C]" <smartheater> (boiler) {mqtt=">[mosquitto:heater_control_t_off:command:*:default],<[mosquitto:heater_control_t_off_stat:state:default]"}
Number Tk1 "t° Колектор 1 (Тк1) [%.1f °C]"	<temperature> (sunheat,Boiler_chart,colector_chart){mqtt="<[mosquitto:Tk1:state:default]"}
Number Tk2 "t° Колектор 2 (Тк2) [%.1f °C]"	<temperature> (sunheat,Boiler_chart,colector_chart){mqtt="<[mosquitto:Tk2:state:default]"}
Number tbp "t° Серпентина Парно (tbp) [%.1f °C]"	<temperature> (heating,Boiler_chart){mqtt="<[mosquitto:tbp:state:default]"}
Number tbc "t° Серпентина Колектор (tbc) [%.1f °C]"	<temperature> (sunheat,Boiler_chart,colector_chart){mqtt="<[mosquitto:tbc:state:default]"}
Number tinst "t° инсталация 1(tinst) [%.1f °C]"	<temperature> (heating,Heating_chart){mqtt="<[mosquitto:tinst:state:default]"}
Number tinst2 "t° инсталация 2 (tinst2) [%.1f °C]"	<temperature> (heating,Heating_chart){mqtt="<[mosquitto:tinst2:state:default]"}
Number tout "t° изход п. котел (tout)[%.1f °C]"	<hot> (heating,Heating_chart){mqtt="<[mosquitto:tout:state:default]"}
Number toutMaxSet "Макс. температура изход п. котел (tout)[%.1f °C]"	<temperature> (heating,Heating_controls){mqtt=">[mosquitto:toutMaxSet:command:*:default],<[mosquitto:toutMaxSet_stat:state:default]"}
Number tin "t° вход п. котел (tin) [%.1f °C]"	<cold> (heating,Heating_chart){mqtt="<[mosquitto:tin:state:default]"}
Number tinMinSet "Мин. Температура вход п. котел (tin) [%.1f °C]"	<temperature> (heating,Heating_controls){mqtt=">[mosquitto:tinMinSet:command:*:default],<[mosquitto:tinMinSet_stat:state:default]"}
Number trec "t° рециркулация (trec)[%.1f °C]"	<temperature> (heating,Heating_chart){mqtt="<[mosquitto:trec:state:default]"}
Number fourwayvalve "Четирипътен клапан  [%s %%]" <four_way_Valvea> (heating,Heating_controls,Heating_chart)
Dimmer fourwayvalve_control	"Четирипътен Клапан [%d %%]" <four_way_Valvea>{mqtt=">[mosquitto:fourwayvalve_control:command:*:default],<[mosquitto:fourwayvalve_control_stat:state:default]"} 
Number treewayvalve "Трипътен клапан [%s]" <tree_way> (boiler) 
Switch treewayvalve_control	"Трипътен Клапан" <tree_way> (manual){mqtt=">[mosquitto:treewayvalve_control:command:*:default],<[mosquitto:treewayvalve_control_stat:state:default]"}
Number tb "t° бойлер (tb)[%.1f °C]"  <temperature> (Boiler_chart){mqtt="<[mosquitto:tb:state:default]"}
Number tbMaxSet "t° бойлер задание (tbMaxSet)[%.1f °C]"  <temperature> (Boiler_chart) {mqtt=">[mosquitto:tbMaxSet:command:*:default],<[mosquitto:tbMaxSet_stat:state:default]"}
Number pump1 "Помпа 1 [%s]" <pump> (heating,Heating_chart)// {mqtt="<[mosquitto:pump1:state:default]"}
Switch pump1_control	"Помпа 1" <pump> (manual) {mqtt=">[mosquitto:pump1_control:command:*:default],<[mosquitto:pump1_control_stat:state:default]"}
Number pump2 "Помпа 2 [%s]" <pump> (heating,Heating_controls)
Switch pump2_control	"Помпа 2" <pump> (manual) {mqtt=">[mosquitto:pump2_control:command:*:default],<[mosquitto:pump2_control_stat:state:default]"}
Number pumpColector "Помпа Колектор [%s]" <pump> (sunheat,Heating_controls)
Number deltaPumpColector "Делта Помпа Колектор [%s]" <pump> (sunheat){mqtt=">[mosquitto:deltaPumpColector:command:*:default],<[mosquitto:deltaPumpColector_stat:state:default]"}
Switch pumpColector_control	"Помпа Колектор" <pump> (manual) {mqtt=">[mosquitto:pumpColector_control:command:*:default],<[mosquitto:pumpColector_control_stat:state:default]"}
Number infoburn "Разход горелка  [%s кг/мин]" <fire> (heating){mqtt="<[mosquitto:infoburn:state:default]"}
Number infotank "Танкер  [%s %%]" <sewerage> (heating){mqtt="<[mosquitto:infotank:state:default]"}
Number heater "Ел. нагревател [%s]" <smartheater> (heating,Heating_controls)
Switch heater_control	"Ел. нагревател" <smartheater> (manual) {mqtt=">[mosquitto:heater_control:command:*:default],<[mosquitto:heater_control_stat:state:default]"}
Number burner2 "Котел ТГ [%s]" <fire> (heating,Heating_controls){mqtt=">[mosquitto:burner2:command:*:default],<[mosquitto:burner2:state:default]"}
Number burner "Горелка [%s]" <fire> (heating,Heating_controls){mqtt=">[mosquitto:burner_control:command:*:default],<[mosquitto:burner_control_stat:state:default]"}
Switch burner_control	"Горелка" <fire> (manual) {mqtt=">[mosquitto:burner_control:command:*:default],<[mosquitto:burner_control_stat:state:default]"}
Number udate_state "Regresh MQTT" <refresh> (heating) {mqtt=">[mosquitto:udate_state:command:*:default]"}
Number hotStete "Режим на котела" <inverter> (heating) {mqtt=">[mosquitto:hotStete:command:*:default],<[mosquitto:hotStete_stat:state:default]"}
Switch calibrationFlagStart "калибровка клапaн" <four_way_Valvea> (heating) {mqtt=">[mosquitto:calibrationFlagStart:command:*:default],<[mosquitto:calibrationFlagStart_Stat:state:default]"}
Switch calibrationFlag"калибровка клапaн [%s]"<light> (heating) {mqtt=">[mosquitto:calibrationFlag:command:*:default],<[mosquitto:calibrationFlag_Stat:state:default]"}
Number boilerPriority "Приоритет бойлер [%s]"<priority> (heating) {mqtt=">[mosquitto:boilerPriority:command:*:default],<[mosquitto:boilerPriority_Stat:state:default]"}
Number tinstSet "Задание t инсталация [%s]" <temperature> (heating) {mqtt=">[mosquitto:tinstSet:command:*:default],<[mosquitto:tinstSet:state:default]"}
Number fourwayvalve_state "Реална позиция [%d %%]" <four_way_Valvea>(heating,Heating_chart){mqtt=">[mosquitto:fourwayvalve_state:command:*:default],<[mosquitto:fourwayvalve_state:state:default]"}
Number children_room_T "Температура [%.1f °C]"	<temperature> (FF_Child,Temp_termostat_chart){mqtt="<[mosquitto:children_room_T:state:default]"}
Number children_room_T_Setpoint "Температура задание [%.1f °C]"	<temperature> (All)
Number children_room_H "Влажност [%.1f %%]"	<humidity> (FF_Child){mqtt="<[mosquitto:children_room_H:state:default]"}
//Switch termostat  {mqtt=">[mosquitto:termostat:command:*:default],<[mosquitto:termostat:state:default]"}
Number treewayvalve_chart_flag "Трипътен клапан" <tree_way> (Heating_chart,Boiler_chart)
Number pumpColector_chart_flag "Помпа колектор" <pump> (colector_chart,Boiler_chart)
Number burner_chart_flag "Горелка пелети" <fire> (Heating_chart,Boiler_chart)
Number Termostat_chart_flag "Термостат" <smartheater> (Temp_termostat_chart)
Switch fileServer "Файл сървър" <computer>(network) { wol="192.168.100.255#00-18-F3-8A-DF-3F" }
Switch WaterSpliterContorller_Out1 "Кръг 1" <irrigation> (irrigation) {mqtt=">[mosquitto:Command_WaterSpliterContorller_Out1:command:*:default],<[mosquitto:Stat_WaterSpliterContorller_Out1:state:default]"}
Switch WaterSpliterContorller_Out2 "Кръг 2" <irrigation> (irrigation) {mqtt=">[mosquitto:Command_WaterSpliterContorller_Out2:command:*:default],<[mosquitto:Stat_WaterSpliterContorller_Out2:state:default]"}
Switch WaterSpliterContorller_Out3 "Кръг 3" <irrigation> (irrigation) {mqtt=">[mosquitto:Command_WaterSpliterContorller_Out3:command:*:default],<[mosquitto:Stat_WaterSpliterContorller_Out3:state:default]"}
Switch WaterSpliterContorller_Out4 "Кръг 4" <irrigation> (irrigation) {mqtt=">[mosquitto:Command_WaterSpliterContorller_Out4:command:*:default],<[mosquitto:Stat_WaterSpliterContorller_Out4:state:default]"}
Switch WaterSpliterContorller_Out5 "Кръг 5" <irrigation> (irrigation) {mqtt=">[mosquitto:Command_WaterSpliterContorller_Out5:command:*:default],<[mosquitto:Stat_WaterSpliterContorller_Out5:state:default]"}

Isn’t this caused by the mqtt-eventbus.cfg?

From the documentation:

First when I get this problem, I tried anything.
After that I removed the OH2 by “purge” command. Then I installed OH2, addons & legacy and configured MQTT.cfg.
When I started Arduino, I found that not all items get update in OH2.
Then I uncommented in mqtt-eventbus.cfg this:
statePublishTopic=${item}
Then became the problem with the sending too many messages from OH2.
After this I commented this, but nothing is changed.
To fix this, may be I should to reinstall OH2. But the problem with no updated items is staying.

Maybe i should return to the good old Windows with OH1 :frowning:

That’s an option. However, this issue is probably not related to Linux or Window or OH1 vs OH2 since the same MQTT bindings are used in both. It’s difficult to know what’s causing the problem because if you are “trying anything” without understanding the effect of the configuration changes the problem could be caused by “anything”.

On the surface, the frequent event publication issue sounds like an MQTT event bus misconfiguration. If I were you, I’d start with a clean install and debug the original problem of not receiving MQTT updates for some of my items. I’d turn on TRACE logging in the MQTT binding and transport and use external MQTT subscribers to verify that the expected messages are flowing.