There would be several ways you could split traffic to have some percentage go to a canary instance. The first two options would require changes on the publish side. First of all, you could use two different topics. The publisher would choose 10% of the traffic to go to the "canary" topic and the remaining 90% could go to the main topic. The second option is to add an attribute to 10% of the messages, e.g., the key "canary" could have a value of "true." Then, you could use two different subscriptions, one for the main tasks and one for the canary tasks and use
filtering to ensure each one receives the correct messages. The last option would be to set up the main subscribers to relay 10% of messages to another canary topic. This one has the advantage of not requiring changes on the publisher side. You would have two topics. Your main publishers would publish to the topic as they always do. Your main subscriber would process 90% of the messages itself and for the other 10%, it would publish them to the canary topic so that the canary tasks could process them.
Kamal