Solace JCSMP API vs Java RTO API use cases/differences

amishra
amishra Member Posts: 10

Can some one Elaborate me the distinction between Solace JCSMP API and Java RTO API . Please elaborate use cases as well i.e. when to use which One as both are Java based implementation . Java RTO is wrapper over C API .

Best Answer

Answers

  • spyroid
    spyroid Member Posts: 8
    edited March 2020 #4

    Hi @amackenzie ,

    I'm thinking to try RTO, but cannot find how can I acknowledge messages manually. Could you please clarify that?
    And also I'm interested in some performance numbers between Java RTO and Java API.

    Thanks

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 595 admin
    edited March 2020 #5

    @spyroid what kind of performance? Throughput or latency? How fast do you need? What type of app are you building?

    For all the difficulties of using the JNI-wrapped wrapper, I'd always suggest trying out the "regular" JCSMP API first, to see if it has the performance to meet your needs. it might be fast enough? For example, I wrote this simple code to get almost 250,000 msg/s (at 300 byte messages) for Direct messages from a single producer and single consumer: https://solace.community/discussion/comment/503#Comment_470

    I still have to finish the equivalent Guaranteed producer & consumer test code.

    Oh, and re: how to ACK messages? https://docs.solace.com/Solace-PubSub-Messaging-APIs/API-Developer-Guide/Acknowledging-Messages.htm

  • spyroid
    spyroid Member Posts: 8

    @Aaron said: @spyroid what kind of performance? Throughput or latency? How fast do you need?

    Throughput, I need as fast as possible. I did sample code (get message and acknowledge) using solace-jms-spring-boot-starter and got about 30k per second.
    I'm intetersted if JCSMP API is faster then JMS API.

  • amackenzie
    amackenzie Member, Employee Posts: 262 Solace Employee

    JCSMP is generally much faster than JMS. There is a Spring Boot Starter for Java/JCSMP also. You might want to give that a try.
    Also, you seem to indicate that throughput is the performance you are looking for. Java RTO, being based on the C API is going to give you lower, more consistent latency but JCSMP is very solid at throughput.
    It would be good to know what your expectations on throughput are as well. Are you going to use a single client or multiple? There is only so fast a single client will go.

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

    30k msg/s as a publisher? A JMS publisher? Do you want Persistent or non-persistent data? You only need to worry about ACKs if you're doing Persistent messaging.