Try PubSub+
If you haven't already, check out our new Developer Portal! You'll find useful information about Solace PubSub+ as well as handy resources to get you started.

Regarding getting messageID via solClient_msg_getApplicationMessageId

amol_p81amol_p81 Member Posts: 20


Is it possible to get the ApplicationMessageId when publishing the message via fun call solClient_msg_getApplicationMessageId?
When publishing i'm trying to get messageId just after fn call solclient_msg_alloc() but i get NULL MessageID.
Any pointers how to use it?



  • TomFTomF Member, Employee Posts: 62 Solace Employee

    Hi @amol_p81, I'm not sure what you're trying to do here. The idea of ApplicationMessageId is that it's for use by your application - so you'd set it as a publisher and the subscriber would query it.

    For the publisher:
    solClient_msg_setBinaryAttachment() // For example

    It will definitely not be set just after you allocate the buffer as the buffer will be unassigned.

    Are you trying to get the messageId? If so, I'd very much recommend against it. This is an internal API message ID not intended for use by users - it is reset during failover, for instance. The recommendation in this scenario is for you to assign the messageID/sequence number etc yourself, using.... setApplicationMessageId().

  • amol_p81amol_p81 Member Posts: 20

    thanks Tom for the update.

Sign In or Register to comment.