Slow producer - Facing delay in JMS producer over solace queue

sumit047 Member Posts: 1

In my application I am facing delay in JCSMPXMLMessageProducer close to ~12ms and I have close to 500K messages to be produced which is causing over all delay in my publisher module ,Below are my publisher logs , Highlighted lines clearly shows producer got response after 12 MS which is huge

2021-07-17 03:20:58.846 [main] DEBUG c.s.j.p.s.SimpleSmfClient - (smfclient 12) needs Direct ByteBuffer of size (5945) current ByteBuffer capacity (5941)
2021-07-17 03:20:58.847 [main] DEBUG c.s.j.i.PubADManager - Starting pub ad timer: scheduled new timer in 2000
2021-07-17 03:20:58.859 [Context_2_ReactorThread] DEBUG c.s.j.i.JCSMPXMLMessageProducer - Got response for AD msg=63729,

2021-07-17 03:20:58.859 [Context_2_ReactorThread] DEBUG c.s.j.i.ADManager - Clear AD timer
2021-07-17 03:20:58.859 [Context_2_ReactorThread] DEBUG c.s.j.i.PubADManager - Processing windowed ack ackid=63729, ackEventCode=SUPPORTED_ACK_EVENT_MODE_PER_MSG
2021-07-17 03:20:58.859 [Context_2_ReactorThread] DEBUG c.s.j.i.PubADManager - Windowed ack for: msg=63729
2021-07-17 03:20:58.859 [Context_2_ProducerDispatcher] DEBUG c.s.j.p.n.i.ProducerResponseNotification - Notify response received for message 63729
2021-07-17 03:20:58.859 [main] DEBUG c.s.j.SolMessageProducer - Leaving sendMessage()
2021-07-17 03:20:58.859 [main] DEBUG c.s.j.SolMessageProducer - Leaving send()
2021-07-17 03:20:58.859 [main] DEBUG c.s.j.SolConnection - Entering stop()
2021-07-17 03:20:58.859 [main] DEBUG c.s.j.SolSession - Entering SolSession.stop() threadId=1
2021-07-17 03:20:58.859 [main] INFO c.s.j.SolSession - SolSession stopped.
2021-07-17 03:20:58.859 [main] DEBUG c.s.j.SolConnection - Leaving stop() : Connection stopped.


  • marc
    marc Member, Administrator, Moderator, Employee Posts: 923 admin

    Hey @sumit047,

    Are you using the JMS or JCSMP API to publish? And can you share the part of your code that publishes?

    In general you want to make sure you are re-using the re-usable resources and not doing something like setting up and tearing down your Session for each message.

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 541 admin

    Hi @sumit047 . It looks like you are using "ack each message" mode, so my first guess around windowed/delayed publisher acknowledgements is wrong. Your logs show the app quitting after this one message... are you able to reproduce the same 12ms delay when publishing lots of messages in a row?

    Having debug logging enabled might also slow things down a bit in your app, depending how many messages you're publishing.

    Is your JMS app using Persistent or Non-Persistent? If Persistent, then you can only have 1 published message "in-flight" at once. How far away is the broker that you're publishing to, what is the RTT?