Hey all,
I have a certain situation, where all the database updates get posted to a publish-subscribe-topic, which in turn has a few subscribers. I would like to handle all the known types that might be posted to the topic, and ignore the rest, but I have a problem configuring the router - the messages that should be ignored are propagating the exceptions instead of ignoring them. I would expect that resolution-required="false" would ignore the messages that don't have corresponding routing rules:
or at leastCode:Specify whether channel names must always be successfully resolved to existing channel instances. If set to 'true', a MessagingException will be raised in case the channel cannot be resolved. Setting this attribute to 'false', will cause any unresovable channels to be ignored. If not explicitly set, 'resolution-required' will default to 'true'.
default-output-channel="dev-null" ignore-send-failures="true"
Code:If set to "true", failures to send to a message channel will be ignored. If set to "false", a MessageDeliveryException will be thrown instead, and if the router resolves more than one channel, any subsequent channels will not receive the message.
None of which are the case. Any insights or suggestions would be welcome!
Code:<int:payload-type-router input-channel="database-update-topic" resolution-required="false" default-output-channel="dev-null" ignore-send-failures="true"> <int:mapping type="com.ajaxoid.domain.shared.PricingRule" channel="pricing-rule-update-channel" /> <int:mapping type="com.ajaxoid.domain.shared.Product" channel="product-update-channel" /> <int:mapping type="com.ajaxoid.domain.shared.Vendor" channel="vendor-update-channel" /> <int:mapping type="com.ajaxoid.domain.shared.Category" channel="category-update-channel" /> </int:payload-type-router> <int:outbound-channel-adapter id="pricing-rule-update-channel" ref="pricingRuleManager" method="pricingRuleUpdated"/> <int:outbound-channel-adapter id="product-update-channel" ref="pricingRuleManager" method="productUpdated"/> <int:outbound-channel-adapter id="vendor-update-channel" ref="pricingRuleManager" method="vendorUpdated"/> <int:outbound-channel-adapter id="category-update-channel" ref="pricingRuleManager" method="categoryUpdated"/> <int:logging-channel-adapter channel="dev-null"/> <int:channel id="dev-null"/>
regards,
--andrius aka phuqit


Reply With Quote
