【发布时间】:2015-11-12 09:56:28
【问题描述】:
我正在使用 int-smpp:outbound-gateway 并提供 SmppSessionFactoryBean。 到目前为止,这一直是一个单租户系统,但我被要求制作这个多租户系统。所以我相信我需要为不同的租户 smpp 连接创建一个连接池。 smpp 出站网关可以做到这一点吗?
我想我可以创建一个接收 SmppSessionFactoryBean 的 SmppSessionBeanFactory,如果它不存在则创建一个 Smpp 会话,或者如果它确实存在则从池中获取它。
有没有更好的方法来做到这一点?
# 更新这基本上就是我想要做的
<int:channel id="smppSessionFactoryChannel"/>
<int:header-enricher id=""
input-channel="smppSessionFactoryChannel" output-channel="smppOutBoundGatewayChannel">
<int:header name="smppSession" ref="SmppSessionFactoryBeanFactory" method="getObject"/>
</int:header-enricher>
<int:channel id="smppOutBoundGatewayChannel"/>
<int-smpp:outbound-gateway id="smppOutBoundGateway"
reply-channel="nullChannel" source-address=""
request-channel="smppOutBoundGatewayChannel">
<int-smpp:session value="#{headers[smppSession]}"/>
</int-smpp:outbound-gateway>
【问题讨论】:
标签: spring spring-integration smpp