Solace Community is getting a facelift!

On March 3rd we will be starting the process of migrating Solace Community to a new platform. As a result, Solace Community will go in to a temporary read-only state. You will still be able to come onto Solace Community and search through posts to find answers, but you won't be able to ask questions, post comments, or react in any way.

We hope to have the migration complete by Wednesday March 5th (or sooner), so please keep an eye out!

.NET solace API (data network) to get solace timestamp

sysem
sysem Member Posts: 15

As title, is there any API for me to get current timestamp from solace ??

Answers

  • TomF
    TomF Member, Employee Posts: 412 Solace Employee

    @sysem Do you mean the timestamp the message was sent or received, or the current system time the broker sees?

    The APIs can be told to insert send and receive timestamps through the session properties GenerateReceiveTimestamps and GenerateSendTimestamps.

  • sysem
    sysem Member Posts: 15

    @TomF

    Yes. I mean if there is an API for me to get the current timestamp from Solace Broker without sending any messages out.

  • TomF
    TomF Member, Employee Posts: 412 Solace Employee

    Not from the messaging API @sysem (at least, as far as I know). The management API is called SEMP, but I don't recall seeing a call that returns the broker time - you'd have to dig around the SEMP API Reference to see if there's a timestamp returned with a call. The only way I did manage to get the broker to report the time was to start a shell on the container (e.g. docker exec -it solace bash).

  • sysem
    sysem Member Posts: 15

    yes

    i know i can get it from management API..

    but my application cannot only access the data network and use the messaging API..


    the only way i can think of is to send a message to a topic and subscribe it itself .. and check the sender timestamp.. / receive timestamp...

  • TomF
    TomF Member, Employee Posts: 412 Solace Employee

    I don't have any better suggestions, I'm afraid.

This Month's Leaders

This Week's Leaders