Mule ESB: JMS selector expression not working -
i have mule integration implements pub-sub model. publisher publishes message topic , subscriber configured receive messages topic. want have subscriber receive messages if custom property named 'entity_type' has values either of following: 'accounts', 'contacts' or 'cases'. unfortunately not working (i mean subscriber doesn't receive message @ all). here code snippets:
publisher:
accountsflow:
<set-property propertyname="entity_type" value="accounts" doc:name="set entity type"/> <jms:outbound-endpoint connector-ref="active_mq_publisher" doc:name="publish accounts" topic="${activemq.sfdc.topicname}" tracking:enable-default-events="true"/> contactsflow:
<set-property propertyname="entity_type" value="contacts" doc:name="set entity type"/> <jms:outbound-endpoint connector-ref="active_mq_publisher" doc:name="publish contacts" topic="${activemq.sfdc.topicname}" tracking:enable-default-events="true"/> casesflow:
<set-property propertyname="entity_type" value="cases" doc:name="set entity type"/> <jms:outbound-endpoint connector-ref="active_mq_publisher" doc:name="publish cases" topic="${activemq.sfdc.topicname}" tracking:enable-default-events="true"/> subscriber:
<jms:inbound-endpoint connector-ref="active_mq_subscriber" doc:name="jms" tracking:enable-default-events="true" topic="${activemq.sfdc.topicname}"> <jms:selector expression="entity_type='accounts' or entity_type='contacts' or entity_type='cases'" /> </jms:inbound-endpoint> <logger message="$$$: entity type = #[message.inboundproperties['entity_type']]" level="info" doc:name="logger"/> if remove 'jms:selector' element, see output in logs:
2015-06-18 15:58:19,574 info o.m.a.p.loggermessageprocessor [[sfdcjob].accountscontactscasessubscriberflow.stage1.02] $$$: entity type = sfdc.locationheader here env details:
mule standalone: 3.6.2 (enterprise edition) os: cent os 7 message broker: active mq 5.11.1 jvm both mule & active mq: 1.7.0.75
i need set filter , interested receive messages message property set 1 of values defined (accounts, contacts, cases). idea why jms selector not working?
edit: tried way set entity type in publisher follows , didn't work.
<jms:outbound-endpoint connector-ref="active_mq_publisher" doc:name="publish accounts" topic="${activemq.sfdc.topicname}" tracking:enable-default-events="true"> <message-properties-transformer doc:name="message properties" scope="outbound"> <add-message-property key="entity_type" value="accounts" /> </message-properties-transformer> </jms:outbound-endpoint>
Comments
Post a Comment