我正在尝试订阅SalesForce中的现有平台事件。 我正在使用URI" salesforce:event / Sales_Order_Event__e" 。这个 路线失败说没有话题存在 名。
主题名称应为" / event / __ e"按照销售人员 文档https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_subscribe_cometd.htm。
如果你注意到日志,那么camel会在主题名前加上 " /主题/&#34 ;.我猜,如果骆驼试图加上前缀" / event"代替 " / topic /",那么事情就可以了。 " /主题"有望推动 主题但不适用于平台事件。
请建议我如何让这个工作。
这是日志。
[INFO ]: org.apache.camel.component.salesforce.internal.SalesforceSession
- Login successful
[WARN ]: org.apache.camel.component.salesforce.SalesforceComponent -
Missing property packages, getSObject* operations will NOT work
[INFO ]: org.apache.camel.spring.SpringCamelContext -
AllowUseOriginalMessage is enabled. If access to the original message
is not needed, then its recommended to turn this option off as it may
improve performance.
[INFO ]: org.apache.camel.spring.SpringCamelContext - StreamCaching is
not in use. If using streams then its recommended to enable stream
caching. See more details at
http://camel.apache.org/stream-caching.html
[WARN ]: org.apache.camel.component.salesforce.SalesforceConsumer -
Property sObjectName or sObjectClass NOT set, messages will be of type
java.lang.Map
[INFO ]: org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper
- Subscribing to channel /topic/event/Sales_Order_Event__e...
[INFO ]: org.apache.camel.spring.SpringCamelContext - Route:
SFDC_Event_Listener_cMessagingEndpoint_1 started and consuming from:
Endpoint[salesforce://event/Sales_Order_Event__e]
[INFO ]: org.apache.camel.spring.SpringCamelContext - Total 1 routes,
of which 1 are started.
[INFO ]: org.apache.camel.spring.SpringCamelContext - Apache Camel
2.17.6 (CamelContext: SFDC_Event_Listener) started in 2.342 seconds
[WARN ]: org.apache.camel.component.salesforce.SalesforceConsumer -
Error subscribing to event/Sales_Order_Event__e: 400::The channel you
requested to subscribe to does not exist
{/topic/event/Sales_Order_Event__e}. Caused by:
[org.apache.camel.component.salesforce.api.SalesforceException - Error
subscribing to event/Sales_Order_Event__e: 400::The channel you
requested to subscribe to does not exist
{/topic/event/Sales_Order_Event__e}]
{message:'Error subscribing to event/Sales_Order_Event__e: 400::The
channel you requested to subscribe to does not exist
{/topic/event/Sales_Order_Event__e}',statusCode:0}
at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$7.onMessage(SubscriptionHelper.java:377)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyOnMessage(AbstractClientSession.java:500)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyMessageListeners(AbstractClientSession.java:483)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.common.AbstractClientSession.notifyListeners(AbstractClientSession.java:248)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.client.BayeuxClient.notifyListeners(BayeuxClient.java:1001)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.common.AbstractClientSession.receive(AbstractClientSession.java:241)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.client.BayeuxClient.processMessage(BayeuxClient.java:787)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.client.BayeuxClient$PublishTransportListener.processMessage(BayeuxClient.java:1193)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.client.BayeuxClient$PublishTransportListener.onMessages(BayeuxClient.java:1185)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:258)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:453)[camel-salesforce-alldep-2.17.6.jar:2.17.6]
谢谢, Sowjanya。
答案 0 :(得分:0)
camel-salesforce组件不支持事件,目前只支持主题。