"Guaranteed Message Publish Window Size" with (Solace) JMS

Mike13
Mike13 Member Posts: 29

Hi there
In one of our applications we use the com.solacesystems.sol-jms (version 10.6.4).
I want to configure publishing as described in
https://solace.com/blog/understanding-guaranteed-message-publish-window-sizes-and-acknowledgement/
I found this:
https://docs.solace.com/Solace-JMS-API/Message-Delivery-Propert.htm#jms_properties_39190069_303737
Is there a way to do that programmatically? Something like (this example does not seem to work):


SolConnection solConnection = (SolConnection) connection;
solConnection.getJCSMPProperties().setProperty(JCSMPProperties.PUB_ACK_WINDOW_SIZE, Integer.valueOf(255));

Best regards
Mike

Tagged:

Comments

  • Mike13
    Mike13 Member Posts: 29
    edited March 2021 #2

    Some additional information:

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

    Hi @Mike13,
    The Solace JMS API supports JMS version 1.1 which only supports a synchronous sends, so essentially waiting for an ack before returning. Because of this the Solace JMS API only allows for a window size of 1 when publishing persistent messages. As you've found, you can change the window size for non-persistent messages. This is a bit more clear when modifying the Publisher Window Size (msgs) property in the JMS Connection Factory settings in PubSub+ Manager.

    A few other notes:

    • The property you refer to at this link is for the consumer side only. Not publishing.
    • Another option would be to use the Solace JCSMP API if you need to publish persistent messages in a larger window size.

    @Ragnar please feel free to chime in if I slipped up anywhere :)

  • Mike13
    Mike13 Member Posts: 29

    Hi @marc
    Thank you for your reply!
    We will now switch to non persisted for messages where possible.
    Solace JCSMP API is unfortunately currently not a variant.
    Best regards
    Mike

  • ahabel
    ahabel Member Posts: 9 ✭✭

    Hi @marc,
    sorry to bring up that old topic again, but we just ran into this issue and I've found your notes here.
    What confuses me a lot is the part of the documentation that says: "for non-persistent guaranteed messages sent by the Publisher".

    So, how could a non-persistent message be guaranteed?

    Or in other words, our szenario is like that:
    We're sending JMS messages to a dynamic Solace Topic (including country code and other dynamic values) on an HA Broker and have - depending on the dynamic values - around 1 to 50 queues with matching subscriptions per message.

    As we cannot tollerate any data loss, we assumed persistent is the right and obvious setting, however - what would be the difference in this scenario if we'd choose Non-Persistent?
    Would the message be ACKed to the Publisher before it is persisted in any of the subscribing queues or synched to the passive node?

    best regards
    Andreas