After correct usage of cosocket api, I'm able to publish concurrently without any errors as seen in our lab tests. The throughput rate is still low when receipts (or confirms) are enabled due to STOMP over AMQP overhead so we've decided to go with a different architecture which involves Redis, message aggregation and RabbitMQ for fast and reliable messaging. For this work, we've written a transport agent called agentredrabbit which is already being used in our production pipelines and we are planning to opensource it soon.
Regards.