you can pass the publisging_id to the message and publisher_name to the publish in this way:
for i in range(100):
amqp_message = AMQPMessage(
body="this is a message {}".format(i),
publishing_id=i, # this will handle the duplication wiht to publisher_name
)
await producer.publish('mystreamu', amqp_message, publisher_name="my_publisher_name")