blob: 7ffd34a5e616f7625ec9edc53a86ab4c76c09f68 [file] [log] [blame]
E. Scott Danielse30fc3a2019-07-16 12:03:45 -04001.if false
2==================================================================================
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -04003 Copyright (c) 2019 Nokia
4 Copyright (c) 2018-2019 AT&T Intellectual Property.
E. Scott Danielse30fc3a2019-07-16 12:03:45 -04005
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17==================================================================================
18.fi
19
20.if false
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -040021 Mnemonic: retry.im
22 Abstract: Common text for all send operation functions. This should be imbedded by any
23 function which will ultimately use the internal send_msg funciton which
24 governs retries in this manner.
25 Date: 16 July 2019
E. Scott Danielse30fc3a2019-07-16 12:03:45 -040026.fi
27
28&h3(Retries)
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -040029The send operations in RMR will retry &ital(soft) send failures until one of three
E. Scott Danielse30fc3a2019-07-16 12:03:45 -040030conditions occurs:
31&half_space
32&indent
33&beg_dlist( 0.3i : ^&bold_font )
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -040034 &di(1.) The message is sent without error
35 &half_space
E. Scott Danielse30fc3a2019-07-16 12:03:45 -040036
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -040037 &di(2.) The underlying transport reports a &ital(hard) failure
38 &half_space
E. Scott Danielse30fc3a2019-07-16 12:03:45 -040039
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -040040 &di(3.) The maximum number of retry loops has been attempted
41 &end_dlist
E. Scott Danielse30fc3a2019-07-16 12:03:45 -040042&uindent
43
44&space
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -040045A retry loop consists of approximately 1000 send attempts &bold(without) any intervening
46calls to &ital(sleep()) or &ital(usleep().)
E. Scott Danielse30fc3a2019-07-16 12:03:45 -040047The number of retry loops defaults to 1, thus a maximum of 1000 send attempts is performed
48before returning to the user application.
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -040049This value can be set at any point after RMr initialisation using the &ital(rmr_set_stimeout())
E. Scott Danielse30fc3a2019-07-16 12:03:45 -040050function allowing the user application to completely disable retires (set to 0), or to
51increase the number of retry loops.
52
53&h3(Transport Level Blocking)
54The underlying transport mechanism used to send messages is configured in &ital(non-blocking)
55mode.
56This means that if a message cannot be sent immediately the transport mechanism will &bold(not)
57pause with the assumption that the inability to send will clear quickly (within a few milliseconds).
58This means that when the retry loop is completely disabled (set to 0), that the failure to
59accept a message for sending by the underlying mechanisms (software or hardware) will be
60reported immediately to the user application.
61
62&space
63It should be noted that depending on the underlying transport mechanism being used, it is
Lott, Christopher (cl778h)5157a972020-04-06 20:31:32 -040064extremely likely that retry conditions will happen during normal operations.
65These are completely out of RMR's control, and there is nothing that RMR can do to avoid or mitigate
66these other than by allowing RMR to retry the send operation, and even then it is possible
67(e.g., during connection reattempts), that a single retry loop is not enough to guarantee a
E. Scott Danielse30fc3a2019-07-16 12:03:45 -040068successful send.
69