Code Review
/
ric-plt
/
e2mgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add license to docs
[ric-plt/e2mgr.git]
/
E2Manager
/
rmrCgo
/
rmrCgoApi.go
diff --git
a/E2Manager/rmrCgo/rmrCgoApi.go
b/E2Manager/rmrCgo/rmrCgoApi.go
index
9b242c4
..
f2ee545
100644
(file)
--- a/
E2Manager/rmrCgo/rmrCgoApi.go
+++ b/
E2Manager/rmrCgo/rmrCgoApi.go
@@
-46,14
+46,18
@@
func (*Context) Init(port string, maxMsgSize int, flags int, logger *logger.Logg
}
}
logger.Infof("#rmrCgoApi.Init - RMR router has been initiated")
}
}
logger.Infof("#rmrCgoApi.Init - RMR router has been initiated")
+
+ // Configure the rmr to make rounds of attempts to send a message before notifying the application that it should retry.
+ // Each round is about 1000 attempts with a short sleep between each round.
+ C.rmr_set_stimeout(ctx.RmrCtx, C.int(1000))
r := RmrMessenger(ctx)
return &r
}
r := RmrMessenger(ctx)
return &r
}
-func (ctx *Context) SendMsg(msg *MBuf
, maxMsgSize int
) (*MBuf, error) {
+func (ctx *Context) SendMsg(msg *MBuf) (*MBuf, error) {
ctx.checkContextInitialized()
ctx.Logger.Debugf("#rmrCgoApi.SendMsg - Going to send message. MBuf: %v", *msg)
ctx.checkContextInitialized()
ctx.Logger.Debugf("#rmrCgoApi.SendMsg - Going to send message. MBuf: %v", *msg)
- allocatedCMBuf := ctx.getAllocatedCRmrMBuf(ctx.Logger, msg,
m
axMsgSize)
+ allocatedCMBuf := ctx.getAllocatedCRmrMBuf(ctx.Logger, msg,
ctx.M
axMsgSize)
defer C.rmr_free_msg(allocatedCMBuf)
state := allocatedCMBuf.state
if state != RMR_OK {
defer C.rmr_free_msg(allocatedCMBuf)
state := allocatedCMBuf.state
if state != RMR_OK {