我是这个领域的新手。我有2个smsc服务提供商连接。如果我发送100条消息50条消息应该通过第一个服务提供商而休息50应该通过第二个服务提供商。这可能吗?如果是这样怎么办?
提前致谢
#1st service provider
group = smsc
smsc = smpp
smsc-id = A
interface-version = 34
host = xxxxx
port = xxxx
system-id = xxxxx
smsc-password = xxxx
system-type = "default"
address-range = ""
transceiver-mode = true
source-addr-ton = 1
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
bind-addr-ton = 1
bind-addr-npi = 1
log-level = 0
log-file = "/var/log/kannel/xxxxx.log"
#2nd service provider
group = smsc
smsc = smpp
smsc-id = B
interface-version = 34
host = xxxxx
port = xxxx
system-id = xxxxx
smsc-password = xxxx
system-type = "default"
address-range = ""
transceiver-mode = true
source-addr-ton = 1
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
bind-addr-ton = 1
bind-addr-npi = 1
log-level = 0
log-file = "/var/log/kannel/xxxxx.log"
答案 0 :(得分:1)
如果您将smsc-id设置为每个路由的相同名称,Kannel将为您加载平衡。如果一个SMSC发生故障,那么所有消息都将通过备用的SMSC发送。 如果两个SMSC都在线,那么Kannel将随机选择一个,这样你就可以达到大约50/50的分布(虽然不完全是50/50)
- 编辑 -
抱歉,我检查过,实际上Kannel会通过最小队列的SMSC发送,所以如果你的消息吞吐量很低,这将永远是第一个SMSC,你将无法实现接近50/50分发的任何地方。这是在kannel源代码的gw / bb_smscconn.c中的代码smsc2_rout()下的。