Thank you for all the information.
My problem was solved, I do not know exactly how but I was investigating for 4 days, doing tests and everything seemed correct although the problem persisted. Yesterday at some point I had to change something and the problem was solved. I can not know exactly what was causing my problem.
One last question, please.
If I raise an event with the value 1 in integer.
The received event will have the value 1 but this will be a literal value, not a integer, am I right? I will have to use int to get the integer value 1.