Is there any setting available in UM Topic to restrict the no of records reading?

We are integrating 2 systems and in that we have used pub sub concept (UM).
Source system can send N of request to ESB and ESB convert into canonical and publish to UM.
But in subscribe end, we have to retrieve and process 7000 records per hour due to target system restriction.
For this scenario, is there any settings available either in UM Topic or trigger to restrict the no of records reading?

I don’t think there is such option in UM server or trigger.

For the specified requirement, I suggest to use on demand subscription from a UM topic or queue instead of using a trigger. To do this, build a custom flow service with ‘pub.jms:createConsumer’ , ‘pub.jms:receive’ , ‘pub.jms:acknlwledge’ wmPublic services which creates a subscriber for the given UM Topic or Queue and receives JMSMessage document with a single message content that is published to UM (basically instead of trigger use the custom service with these 3 services to subscribe a single message from UM). The first two inbuilt services should be under a repeat step with repeat count value - 6999 in your case.

Use the custom flow service as a scheduler to run for every 1 hour. Or you may configure the repeat count to a smaller number to spread the 7000 count across an hour by running the scheduler accordingly.

Make sure to invoke the service ‘pub.jms:acknowledge’ at the end of your custom flow service to acknowledge the message process completion to UM. Failing to do so, you’ll subscribe same message again when this service is invoked.

Note: Before publishing any messages to the UM Topic or Queue, run this custom flow service once so that it creates a Durable Subscriber. Failing to do so, all the messages will be lost and the subscription will not happen.

Hope this helps. Let me know if any challenges.


1 Like