Solace PubSub+ Cache Timestamp

timob
timob Member Posts: 11

Hi there, everybody,

is there a way in the Solace Java API (JCSMP) to retrieve a received-timestamp from Solace Pubsub+ cache messages ? In other words a timestamp of when the cache received the message. We use the cache as a kind of last value store and would like to use board-level tools to query when a specific topic was last modified.

Greetings and thanks a lot
Timo

Best Answer

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee
    #2 Answer ✓

    Hi @timob,
    I don't think there's a way to retrieve a timestamp from a cache request that shows the last time a message was received in to the cache.
    However, you can get the information you want, and a lot more, by using the show cache-instance eq-cluster1-instance1 remote topics command. You can also use the SEMP protocol to do this programmatically. See the docs here. Example output (apologies for formatting):

    Cache Instance : eq-cluster1-instance1
    Cache Cluster : eq-cluster1
    Distributed Cache : equities
    Message VPN : default

    Current Cumulative current Cumulative Last
    Topic Msg Count Msg Count Byte Count Byte Count Arrival


    md/nyse/bac 1 2000 1026 2052000 Feb 26 2012 06: 24:18
    md/nyse/c 1 1000 1024 1024000 Feb 26 2012 06: 24:18
    md/nyse/ge 1 1000 1025 1025000 Feb 26 2012 18: 22:12
    md/nyse/pfe 1 1000 1026 1026000 Feb 26 2012 06: 24:1


    Total 4 5000 4101 5127000

Answers

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee
    #3 Answer ✓

    Hi @timob,
    I don't think there's a way to retrieve a timestamp from a cache request that shows the last time a message was received in to the cache.
    However, you can get the information you want, and a lot more, by using the show cache-instance eq-cluster1-instance1 remote topics command. You can also use the SEMP protocol to do this programmatically. See the docs here. Example output (apologies for formatting):

    Cache Instance : eq-cluster1-instance1
    Cache Cluster : eq-cluster1
    Distributed Cache : equities
    Message VPN : default

    Current Cumulative current Cumulative Last
    Topic Msg Count Msg Count Byte Count Byte Count Arrival


    md/nyse/bac 1 2000 1026 2052000 Feb 26 2012 06: 24:18
    md/nyse/c 1 1000 1024 1024000 Feb 26 2012 06: 24:18
    md/nyse/ge 1 1000 1025 1025000 Feb 26 2012 18: 22:12
    md/nyse/pfe 1 1000 1026 1026000 Feb 26 2012 06: 24:1


    Total 4 5000 4101 5127000

  • timob
    timob Member Posts: 11

    Hi @TomF,
    Many thanks for the quick and detailed answer. Have a wonderful Christmas time!
    Best
    Timo

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee

    Pleasure, @timob, have a good Christmas yourself!