User Tools

Site Tools


wiki:wiki3:faq_message_buffering

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:wiki3:faq_message_buffering [2019/06/21 15:43]
tda created
wiki:wiki3:faq_message_buffering [2023/02/02 10:30] (current)
ehe [How to configure the number of messages in database ?]
Line 1: Line 1:
 ====== FAQ: Message Buffering ====== ====== FAQ: Message Buffering ======
-\\ +
-\\+
 ===== How to activate the message buffering on my gateway? ===== ===== How to activate the message buffering on my gateway? =====
  
Line 7: Line 6:
  
 <​code>​lorafwdctl database.enable true</​code>​ <​code>​lorafwdctl database.enable true</​code>​
-You can verify that the feature is enabled by reading the database.enable variable in the configuration file specified in ///​etc/​default/​lorafwd//+ 
 +You can verify that the feature is enabled by reading the database.enable variable in the configuration file specified in ''​/​etc/​default/​lorafwd''​ 
 + 
 +  * For FW < 4.3.3 :
  
 <​code>​ <​code>​
Line 21: Line 23:
 EXTRA_ARGS="​-v"​ EXTRA_ARGS="​-v"​
  
-root@klk-lpbs-050792:/​etc/​default # cat /​user/​etc/​lorafwd/​lorafwd.toml ​grep -i -A10 "\[ database \]"+root@klk-lpbs-050792:/​etc/​default # grep -i -A10 "\[ database \]" ​/​user/​etc/​lorafwd/​lorafwd.toml 
 +[ database ] 
 + 
 +# Whether or not a persistent database will store the incoming messages until 
 +# they will be sent and acknowledged. 
 +
 +# Type:    boolean 
 +# Example: true 
 +# Default: false 
 +
 +enable = true 
 + 
 +</​code>​ 
 + 
 +   * For FW >= 4.3.3 : 
 + 
 +<​code>​ 
 + 
 +root@klk-lpbs-050792:​~ # cat /​etc/​default/​lorafwd 
 +# Configuration file for lorafwd. 
 + 
 +# The configuration file. 
 +# The configuration files can be found in: /​etc/​lorafwd 
 +CONFIGURATION_FILE="/​etc/​lorafwd/​lorafwd.toml"​ 
 + 
 +# The extra arguments. 
 +EXTRA_ARGS="​-v"​ 
 + 
 +root@klk-lpbs-050792:/​etc/​default # grep -i -A10 "\[ database \]" ​/​etc/​lorafwd.toml
 [ database ] [ database ]
  
Line 35: Line 65:
 </​code>​ </​code>​
 \\ \\
 +Then restart the packet forwarder:
 +<​code>​
 +monit stop lorafwd
 +monit stop lorad
 +monit start lorad
 +monit start lorafwd
 +</​code>​
 +
 \\ \\
 ===== How to deactivate the message buffering on my gateway? ===== ===== How to deactivate the message buffering on my gateway? =====
Line 41: Line 79:
  
 <​code>​lorafwdctl database.enable false</​code>​ <​code>​lorafwdctl database.enable false</​code>​
-You can verify that the feature is enabled by reading the database.enable variable in the configuration file specified in ///​etc/​default/​lorafwd//+You can verify that the feature is enabled by reading the database.enable variable in the configuration file specified in ''​/​etc/​default/​lorafwd''​ 
 + 
 +  * For FW < 4.3.3 :
  
 <​code>​ <​code>​
Line 55: Line 95:
 EXTRA_ARGS="​-v"​ EXTRA_ARGS="​-v"​
  
-root@klk-lpbs-050792:/​etc/​default # cat /​user/​etc/​lorafwd/​lorafwd.toml | grep -i -A10 "\[ database \]"+root@klk-lpbs-050792:/​etc/​default # grep -i -A10 "\[ database \]" ​/​user/​etc/​lorafwd/​lorafwd.toml
 [ database ] [ database ]
  
Line 68: Line 108:
  
 </​code>​ </​code>​
 +
 +  * For FW >= 4.3.3 :
 +
 +<​code>​
 +
 +root@klk-lpbs-050792:​~ # cat /​etc/​default/​lorafwd
 +# Configuration file for lorafwd.
 +
 +# The configuration file.
 +# The configuration files can be found in: /​etc/​lorafwd
 +CONFIGURATION_FILE="/​etc/​lorafwd/​lorafwd.toml"​
 +
 +# The extra arguments.
 +EXTRA_ARGS="​-v"​
 +
 +root@klk-lpbs-050792:/​etc/​default # grep -i -A10 "\[ database \]" /​etc/​lorafwd.toml
 +[ database ]
 +
 +# Whether or not a persistent database will store the incoming messages until
 +# they will be sent and acknowledged.
 +#
 +# Type:    boolean
 +# Example: true
 +# Default: false
 +#
 +enable = false
 +
 +</​code>​
 +
 \\ \\
 +Then restart the packet forwarder:
 +<​code>​
 +monit stop lorafwd ​
 +monit stop lorad
 +monit start lorad 
 +monit start lorafwd
 +</​code>​
 +
 +\\
 +===== How to configure the number of messages in database ? =====
 +
 +<note important>​
 +The default value is 200 messages stored in the database. \\
 +The maximum value is 1000 but **Kerlink does not recommend to change the default value of 200 to avoid system load issues**. ​
 +</​note>​
 +
 +  * FW < 4.3.3:
 +
 +<​code>​
 +root@klk-lpbs-050792:/​etc/​default # grep -i -A10 "\[ limit.messages \]" /​user/​etc/​lorafwd/​lorafwd.toml
 +</​code>​
 +
 +  * FW >= 4.3.3:
 +
 +<​code>​
 +root@klk-lpbs-050792:/​etc/​default # grep -i -A8 "The maximum number of messages"​ /​etc/​lorafwd.toml
 +</​code>​
 +
 +<​code>​
 +# The maximum number of messages allowed to be stored in the database. When
 +# full the newest message will replace the oldest one.
 +#
 +# Type:    integer
 +# Example: 20000
 +# Default: 200
 +#
 +#​limit.messages = 200
 +</​code>​
 +
 +Uncomment the variable limit.messages. Modify the value then restart the packet forwarder:
 +<​code>​
 +monit stop lorafwd
 +monit stop lorad
 +monit start lorad
 +monit start lorafwd
 +</​code>​
 +
 +\\
 +===== How to enable the Message Buffering for a group of gateways ? =====
 +
 +The workflow is naturally designed to do this job. \\
 +To enable the Message Buffering for a group of gateways, we will use the Workflow template "​createGatewayCommand"​.
 +
 +=== Creating the template ===
 +
 +The first step is to create the workflow template. \\
 +To achieve this, select the Workflows item from the main left menu and then select '​Templates'​. \\
 +Press the "​+"​ icon to create a new one. \\
 +
 +{{:​wiki3:​creategatewaycommand.png?​1000|}}
 +
 +Give a name to your template ex "​createGatewayCommand"​ and give a description.
 +Then drag and drop the web service "​createGatewayCommand"​ to the "​Selected"​ area.
 +Finally select the "​VALIDATE"​ button to confirm the template creation.
 +
 +=== Selecting gateways ===
 +
 +Select all the gateways you want to enable the Message Buffering feature.
 +Care to select the same type of gateways (iSeries gateways or Wirnet Stations).
 +
 +{{:​wiki3:​selectinggateways.png?​1000|}}
 +
 +
 +=== Executing the template ===
 +
 +Click the "​Selection"​ item from the top of the page :
 +
 +{{:​wiki3:​basketselection.png?​800|}}
 +
 +Select "​Execute workflow"​ item from the horizontal menu.
 +
 +Then, select the pull-down menu and select your template :
 +
 +{{:​wiki3:​executeworkflowmessagebuffering_1.png?​1000|}}
 +
 +{{:​wiki3:​executeworkflowmessagebuffering_2.png?​1000|}}
 +
 +Fill-in the field "​command"​ with the following value :
 +
 +<​code>​
 +monit stop lorafwd ; monit stop lorad ; lorafwdctl database.enable true ; monit start lorad ; monit start lorafwd
 +</​code>​
 +
 +This command specifies to the system to stop the Packet Forwarder (lorad and lorafwd), changing the property "​database.enable"​ to "​true"​ to enable Message buffering and then restart the Packet Forwarder. ​
 +
 +Then press the "​START"​ button to execute the workflow.
 +The following message indicates that the workflow has started :
 +
 +{{:​wiki3:​executeworkflowmessagebuffering_3.png?​300|}}
 +
 +Select the option "​Running"​ in the "​Workflows"​ menu from the left side of the page to check that the workflow is running and then select the option "​Completed"​ and wait for the workflow completion (for 2 gateways the duration is 10 seconds). When terminating,​ the workflow disappears from the "​Running"​ page and appears in the "​Completed"​ page.
 +
 +{{:​wiki3:​executeworkflowmessagebuffering_4.png?​1000|}}
 +
 +You can click the workflow template (here "​createGatewayCommand"​ to see the individual result of the execution of the workflow for each gateway :
 +
 +{{:​wiki3:​executeworkflowmessagebuffering_5.png?​1000|}}
 +
 +Message Buffering has been activated for all gateways specified in the workflow.
 +
 +
wiki/wiki3/faq_message_buffering.1561124622.txt.gz · Last modified: 2019/06/21 15:43 by tda