Query regarding Topic Based Filtering of Payload
I have a Solace Topic Based Filtering related requirement in which we have a topic already established with the topic name:
Dia/Tech/Mulesoft/Interlayer/PRC/PIOS/RSVD/RSVD/FromMSBQueue/Published/1/PRC/PIOS
which is attached as a subscription to
Queue in On-Premises : Dia.Azure.POC & Queue in Cloud Broker : Test.PIOS.Pub.Cloud in our Solace Dev Environment.
Messages are being published to these topic in Solace Dev Env through a MuleSoft Application
and the sample message is as follows:
{ "RetryCount": 0, "OldAccessLevel": 1, "EntityTypeID": 6, "DocumentTypePIMID": "672FCB74-E56B-E311-B34A 6C626DCA13E4", "CreateDate": "2021-10-06T08:48:13.263", "IsNew": true, "SourcePIMID": null, "IsDeleted": false, "IsUpdated": false, "SourceUpdatedColumns": null, "SourceEntityTypeID": null, "SourceIsDeleted": null, "CountryISOCode": null, "PIMID": "CB5C9EF4-0FA7-E911- F08C-F4A30BC86A7B", "SourceIsUpdated": null, "UpdatedColumns": null, "RequestID": null, "NewAccessLevel": 1, "SourceIsNew": null, "ID": 396536250, "Status": 4 }
The requirement is such that we need to filter out the above sample message that is being published based on the conditions such as EntityTypeID=6 containing msgs should be published by another topic and other conditions like
EntityTypeId = 6 AND SourceEntityTypeId IS NULL AND (NewAccessLevel <= 1 OR (OldAccessLevel IS NOT NULL AND OldAccessLevel <= 1)) AND DocumentTypePimIdString IS NOT NULL AND (DocumentTypePimIdString = 'e32ecb74-e56b-e311-b34a-6c626dca13e4')
containing msgs should be published by another topic .
Is there any way to achieve this requirement for PoC purpose considering the topic hierarchy based filtering by looking inside the payload of message through Solace ?
Could you pls suggest the topic names that can be created based on the above sample message and filter conditions ?
I'll try to publish the message to the newly created topic from Mule application and try its testing whether the filtering works in our Dev Environment as a PoC purpose.
Please share and explain your opinion to achieve this requirement? Require inputs on this...
Comments
-
Hi,
You wouldn’t be and you filter complex logic as you described using purely topic filters especially when doing numeric comparisons. Perhaps you can put the EntityID in the topic. Everything else can be put in the message header and you can use message selectors for the filtering logic
0 -
Hi Venkat,
pleasure talking earlier. Just confirming here - your publisher needs to publish onto different topics to allow subscribers to filter.
A great primer on how topics and filtering work can be seen here: https://docs.solace.com/Get-Started/Understanding-Topics.htm
0