Sending/Receiving
After a CreateMessage() or CreateMessages() method call, the message or messages are placed in the API’s encrypted managed queue. Neither the API nor the Internet Service Bus (ISB) reviews the content of the message Body or Attachments, except for determining size.
After security and validation checks, the local encrypted managed API queue then sends the message, or messages either based on an event or based on a schedule.
Sending and receiving messages is asynchronous and non-blocking to your program. This means your program instance can keep on doing what it is doing and not worry about getting hung while processing a send or receive operation. This is true regardless if done via the on-demand method calls or if scheduled intervals are used.
On-demand
In your code, you can send and receive on-demand using the SendNow() and ReceiveNow() method calls.
ReceiveNow() will not be fired when called if there is not a subscription to the MessageReceivedEvent.
Scheduled Sending and Receiving
Sending
Scheduled sending is automatically enabled when your program instance is running. Your instance will only try to send a message if there is one or more waiting to be sent in your local queue.
Receiving
Scheduled receiving is automatically enabled when your instance is running and there is a subscription to the MessageReceivedEvent.
Fixed or Range Interval
The schedule can be a fixed time interval, or an allowed range which an instance can choose from (either programmatically or via a user interface control). The settings for these events can be dynamically updated through Web Manager.
Stopping Scheduled
In your code you can stop and start the scheduled sending and receiving using these method calls:
- StopScheduledSend
- StopScheduledReceive
- StartScheduledSend
- StartScheduledReceive
Additionally, you can choose to not have scheduled sending and receiving activated on instance start-up using the dontStartScheduledSendingReceiving parameter for the LinxterSDK class.
Note: See the API Docs for code examples.