为什么无法从Apache骆驼Smpp创建路由smpp-sender?

问题描述

我正在一个项目中,我应该使用Apache骆驼Smpp发送SMS。由于缺少资源,我遵循了本教程。

https://medium.com/@pasindusenerath/exposing-rest-endpoint-to-send-sms-using-apache-camel-springboot-and-smpp-protocol-7f0ef53a5a55

我正在为此使用硒软件Smpp模拟器。当我启动项目时,它给出了这样的错误

org.apache.camel.FailedToCreateRouteException: Failed to create route smpp-sender at: >>> To[smpp://{{smpp.tr.systemid}}@{{smpp.tr.host}}:{{smpp.tr.port}}?password={{smpp.tr.password}}&enquireLinkTimer=3000&transactionTimer=5000&sourceAddrTon={{smpp.source.addr.ton}}&sourceAddrNpi={{smpp.source.addr.npi}}&destAddrTon={{smpp.dest.addr.ton}}&destAddrNpi={{smpp.dest.addr.npi}}&sourceAddr={{smpp.source.address}}] <<< in route: Route(smpp-sender)[From[seda:newMessage?concurrentConsumers=... because of No endpoint could be found for: smpp://smppclient1@localhost:2775?destAddrNpi=0&destAddrTon=0&enquireLinkTimer=3000&password=password&sourceAddr=TEST&sourceAddrNpi=1&sourceAddrTon=5&transactionTimer=5000,please check your classpath contains the needed Camel component jar.

以下是我的一些代码段。

@Component

公共类SmsNotificationRouter扩展了RouteBuilder {

@BeanInject
private MessageProcessor messageProcessor;

@Override
public void configure() throws Exception {
    restConfiguration().component("servlet").port(9090).host("localhost").bindingMode(RestBindingMode.json);

   rest().post("/message")
           .consumes(MediaType.APPLICATION_JSON_VALUE)
           .type(MessageData.class)
           .outType(MessageData.class)
           .to("seda:newMessage");

    from("seda:newMessage?concurrentConsumers=20").routeId("smpp-sender").process(messageProcessor)
            .setHeader("CamelSmppDestAddr",simple("94${in.body.sender}"))
            .setBody(simple("${in.body.messageBody}"))
            .to("smpp://{{smpp.tr.systemid}}@{{smpp.tr.host}}:{{smpp.tr.port}}?password={{smpp.tr.password}}&enquireLinkTimer=3000&transactionTimer=5000&sourceAddrTon={{smpp.source.addr.ton}}&sourceAddrNpi={{smpp.source.addr.npi}}&destAddrTon={{smpp.dest.addr.ton}}&destAddrNpi={{smpp.dest.addr.npi}}&sourceAddr={{smpp.source.address}}");

}

}

有人可以帮我摆脱这个吗?

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...